Skip to content

Commit

Permalink
chore: renamed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlwn123 committed Sep 5, 2024
1 parent 2f2dd0f commit f6e3cc7
Show file tree
Hide file tree
Showing 39 changed files with 30 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .changeset/giant-lies-explain.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'fedimint-web': patch
'core-web': patch
'fedimint-client-wasm': patch
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/weak-zebras-peel.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'fedimint-web': patch
'core-web': patch
'fedimint-client-wasm': patch
---

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
paths: ['packages/fedimint-web/**', 'examples/vite-core/**']
paths: ['packages/core-web/**', 'examples/vite-core/**']
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CHANGELOG.md
pnpm-lock.yaml
tsconfig.base.json
packages/fedimint-web/wasm/**
packages/core-web/wasm/**
tmp/**
*.html
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ There two main folders are:

### Packages

- [`fedimint-web`](./packages/fedimint-web/README.md): Provides a typescript interface for the Fedimint client wasm
- `fedimint-react`: TBD
- [`core-web`](./packages/core-web/README.md): Provides a typescript interface for the Fedimint client wasm
- `react`: TBD

### Examples

Expand Down
6 changes: 3 additions & 3 deletions examples/vite-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is an example application demonstrating the usage of Fedimint client in a s

## Technologies Used

- fedimint-web: The Fedimint client library for web applications
- core-web: The Fedimint client library for web applications
- Vite: A fast build tool and development server. Check the [`vite.config.ts`](./vite.config.ts) for configurations required for handling wasm.
- React

Expand All @@ -18,8 +18,8 @@ This is an example application demonstrating the usage of Fedimint client in a s
1. Clone the repository and navigate to the example directory:

```
git clone https://github.com/fedimint/fedimint-web-sdk.git
cd fedimint-web-sdk/examples/vite-core
git clone https://github.com/fedimint/core-web-sdk.git
cd core-web-sdk/examples/vite-core
```

2. Install dependencies:
Expand Down
6 changes: 3 additions & 3 deletions examples/vite-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build:pages": "tsc && vite build --base /fedimint-web-sdk/",
"build:pages": "tsc && vite build --base /core-web-sdk/",
"preview": "vite preview",
"preview:pages": "vite preview --base /fedimint-web-sdk/",
"preview:pages": "vite preview --base /core-web-sdk/",
"clean": "rm -rf dist tsconfig.tsbuildinfo",
"clean:deep": "pnpm run clean && rm -rf node_modules"
},
"dependencies": {
"@fedimint/fedimint-web": "workspace:*",
"@fedimint/core-web": "workspace:*",
"react": "^18.3.1",
"react-dom": ">=18.3.1"
},
Expand Down
28 changes: 6 additions & 22 deletions examples/vite-core/src/wallet.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
import { FedimintWallet } from '@fedimint/fedimint-web'

// TODO: Fix this
// Add init state inside of FedimintWallet
// Constructor should be sync
// then call open/join on the object
// throw errors if instance methods are called before
// the wallet is open

// const wallet = new FediintWallet()...
// wallet.open()

// export wallet
import { FedimintWallet } from '@fedimint/core-web'

const wallet = new FedimintWallet()

await wallet
.open()
.then((res) => {
console.warn('JOINED', JSON.stringify(res))
return res
})
.catch((e) => {
console.warn('JOIN FAILED', e)
})
try {
await wallet.open()
} catch (e) {
console.warn('Failed to open wallet', e)
}

export { wallet }
2 changes: 1 addition & 1 deletion examples/vite-core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import topLevelAwait from 'vite-plugin-top-level-await'
export default defineConfig({
plugins: [topLevelAwait(), wasm(), react()],
optimizeDeps: {
exclude: ['fedimint-web'],
exclude: ['core-web'],
},
})
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ This package provides a typescript interface for the Fedimint client in the brow
## Installation

```sh
npm install fedimint-web
npm install core-web
# or
yarn add fedimint-web
yarn add core-web
# or
pnpm add fedimint-web
pnpm add core-web
```

## Usage

```ts
import { FedimintWallet } from 'fedimint-web'
import { FedimintWallet } from 'core-web'

// federation invite code
const inviteCode = 'fed11qgqpw9thwvaz7t...'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@fedimint/fedimint-web",
"name": "@fedimint/core-web",
"description": "Library for building web apps with a fedimint client",
"version": "0.0.0-alpha.2",
"repository": {
"type": "git",
"url": "https://github.com/fedimint/fedimint-web-sdk.git",
"directory": "packages/fedimint-web"
"directory": "packages/core-web"
},
"scripts": {
"build": "pnpm run clean && tsc --project tsconfig.json",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@fedimint/fedimint-react",
"name": "@fedimint/react",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f6e3cc7

Please sign in to comment.