-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
27 additions
and
218 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 |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ['16', '18', '20'] | ||
node: ["18"] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -49,10 +49,9 @@ jobs: | |
with: | ||
key: ${{ matrix.settings.target }}-node@${{ matrix.node }}-cargo-cache | ||
|
||
- name: Install wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
version: "latest" | ||
- name: Install cargo components | ||
run: | | ||
cargo install cargo-component && yarn global add @bytecodealliance/jco | ||
- name: Install dependencies | ||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 | ||
|
@@ -67,4 +66,4 @@ jobs: | |
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wasm32 | ||
path: pkg/**/*.wasm | ||
path: pkg/*.wasm |
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
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 |
---|---|---|
|
@@ -10,15 +10,15 @@ | |
"files": [ | ||
"pkg/**/*", | ||
"index.js", | ||
"index.d.ts", | ||
"Readme.md" | ||
], | ||
"author": "Zimon Dai <[email protected]>", | ||
"license": "MIT", | ||
"types": "./pkg/bundler/index.d.ts", | ||
"types": "./index.d.ts", | ||
"scripts": { | ||
"build": "wasm-pack build --target bundler --out-name index --out-dir pkg/bundler --release && wasm-pack build --target nodejs --out-name index --out-dir pkg/node --release && rm -rf pkg/bundler/package.json", | ||
"build:wasi": "cargo build --release --target wasm32-wasi && mkdir -p pkg/wasi && cp target/wasm32-wasi/release/fontkit.wasm pkg/wasi/", | ||
"test": "NODE_OPTIONS='--loader=tsx' ava", | ||
"build": "cargo component build --release && jco transpile target/wasm32-wasi/release/fontkit.wasm -o pkg --no-namespaced-exports", | ||
"test": "ava", | ||
"format:rs": "cargo fmt", | ||
"format:source": "prettier --config ./package.json --write './**/*.{js,ts,mjs}'", | ||
"format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'", | ||
|
@@ -48,9 +48,6 @@ | |
"extensions": { | ||
"ts": "module" | ||
}, | ||
"nodeArguments": [ | ||
"--loader=tsx" | ||
], | ||
"timeout": "2m", | ||
"environmentVariables": { | ||
"TS_NODE_PROJECT": "./tsconfig.json" | ||
|
@@ -66,7 +63,6 @@ | |
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@bytecodealliance/preview2-shim": "^0.16.1", | ||
"walkdir": "^0.4.1" | ||
"@bytecodealliance/preview2-shim": "^0.16.1" | ||
} | ||
} |
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