Skip to content

Commit

Permalink
latest js-component-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Nov 17, 2022
1 parent 256bc9b commit 025dc1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chompfile.toml
Expand Up @@ -5,7 +5,7 @@ extensions = ['chomp@0.1:npm', 'chomp@0.1:footprint']
[env-default]
WASI_PATH = '/opt/wasi-sdk'
WASM_TOOLS = '../wasm-tools/target/debug/wasm-tools'
JSCT = 'jsct'
JSCT = './node_modules/.bin/jsct'
WIT_BINDGEN = '../wit-bindgen/target/debug/wit-bindgen'

[[task]]
Expand All @@ -19,15 +19,15 @@ run = 'babel dist/lexer.js | terser -c -m -o dist/lexer.cjs'

[[task]]
targets = ['dist/lexer.js', 'dist/lexer.d.ts']
deps = ['obj/lexer-component.wasm', 'obj/preamble']
deps = ['obj/lexer-component.wasm', 'obj/preamble', 'npm:install']
run = '''
${{ JSCT }} host obj/lexer-component.wasm -o dist --name=lexer --valid-lifting-optimization --optimize --minify -b9000 -q
cat obj/preamble > dist/tmp ; cat dist/lexer.js >> dist/tmp ; mv dist/tmp dist/lexer.js
'''

[[task]]
target = 'dist/lexer.asm.js'
dep = 'obj/lexer-component.wasm'
deps = ['obj/lexer-component.wasm', 'npm:install']
run = '''
${{ JSCT }} host obj/lexer-component.wasm -o dist --name=lexer.asm --valid-lifting-optimization --optimize --minify --asm -q
cat obj/preamble.asm > dist/tmp ; cat dist/lexer.asm.js >> dist/tmp ; mv dist/tmp dist/lexer.asm.js
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -27,6 +27,7 @@
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.224",
"@types/node": "^18.7.1",
"js-component-tools": "^0.1.3",
"kleur": "^2.0.2",
"mocha": "^5.2.0",
"terser": "^5.15.1",
Expand Down

0 comments on commit 025dc1d

Please sign in to comment.