-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bare js example app & updated docs (#38)
* feat: added bare js example * docs: updated readmes & added architecture.md * docs: add TESTING.md * chore: revert prettier on minified bundles * chore: changeset * chore: update size action
- Loading branch information
1 parent
ec6f0c2
commit 6aae407
Showing
17 changed files
with
2,569 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@fedimint/core-web': patch | ||
--- | ||
|
||
Added cursory documentation `/docs` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ pnpm-lock.yaml | |
tsconfig.base.json | ||
packages/wasm-web/** | ||
packages/wasm-bundler/** | ||
examples/bare-js/** | ||
tmp/** | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import fs from 'fs' | ||
import path from 'path' | ||
import { createRequire } from 'module' | ||
|
||
const require = createRequire(import.meta.url) | ||
const CORE_LIB_DIST = path.dirname(require.resolve('@fedimint/core-web')) | ||
const WASM_DIST = path.resolve( | ||
CORE_LIB_DIST, | ||
'../node_modules/@fedimint/fedimint-client-wasm', | ||
) | ||
|
||
function printErr(err) { | ||
if (err) return console.log(err) | ||
} | ||
|
||
// fs.copyFile(path.resolve(CORE_LIB_DIST, 'index.js'), './index.js', printErr) | ||
fs.copyFile( | ||
path.resolve(CORE_LIB_DIST, '../src/worker/worker.js'), | ||
'./worker.js', | ||
printErr, | ||
) | ||
// fs.copyFile(path.resolve(WASM_DIST, 'fedimint_client_wasm_bg.wasm'), './fedimint_client_wasm_bg.wasm', printErr) | ||
|
||
// fs.copyFile(path.resolve(WASM_DIST, 'fedimint_client_wasm.js'), './fedimint_client_wasm.js', printErr) | ||
// fs.copyFile(path.resolve(WASM_DIST, 'fedimint_client_wasm_bg.js'), './fedimint_client_wasm_bg.js', printErr) |
Oops, something went wrong.