File tree 3 files changed +9
-12
lines changed
3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 3
3
# Ignore everything,
4
4
/** /*
5
5
6
- # but include these folders
6
+ # but include these.
7
7
! /assembly /** /*
8
-
9
- # except for these files in the above folders.
10
- /src /** /* .spec. *
11
- /src /tests /** /*
12
-
13
- # The following won't work as you think it would.
14
- # /**/*
15
- # !/build/**/*
16
- # !/src/**/*
17
- # /**/*.spec.*
8
+ ! /index.js
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ const wasmModule = ASLoader.instantiateSync(
38
38
imports ,
39
39
)
40
40
41
+ // Before doing anything, give the exports to ECMAssembly
41
42
es . wasmExports = wasmModule . exports
42
43
44
+ // Now run anything (in this case, the example's tests/index.js file will call the exported functions).
43
45
export default wasmModule . exports
Original file line number Diff line number Diff line change 2
2
"name" : " ecmassembly" ,
3
3
"version" : " 0.1.1" ,
4
4
"type" : " module" ,
5
+ "home" : " " ,
5
6
"scripts" : {
6
7
"start" : " npm run dev" ,
7
8
"build" : " npm run asbuild" ,
8
9
"dev" : " npm run asbuild:untouched && npm test && echo TODO: watch mode" ,
9
10
"asbuild:untouched" : " asc assembly/index.ts --target debug --exportTable --exportRuntime" ,
10
11
"asbuild:optimized" : " asc assembly/index.ts --target release --exportTable --exportRuntime" ,
11
12
"asbuild" : " npm run asbuild:untouched && npm run asbuild:optimized" ,
12
- "test" : " cd example && npm start"
13
+ "test" : " cd example && npm start" ,
14
+ "release:patch" : " npm version patch -m 'v%s' && npm publish && git push --follow-tags" ,
15
+ "release:minor" : " npm version minor -m 'v%s' && npm publish && git push --follow-tags" ,
16
+ "release:major" : " npm version major -m 'v%s' && npm publish && git push --follow-tags"
13
17
},
14
18
"dependencies" : {
15
19
"@assemblyscript/loader" : " ^0.18.11"
You can’t perform that action at this time.
0 commit comments