Skip to content

Commit 01fc960

Browse files
authored
chore: simplify script command (jameslan#135)
1 parent d08d272 commit 01fc960

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

binding/emcc.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-L.libs
2+
-lxml2
3+
-o libxml2raw.mjs
4+
--no-entry
5+
-s EXPORT_ES6=1
6+
-s ALLOW_MEMORY_GROWTH=1
7+
-s ALLOW_TABLE_GROWTH=1
8+
-s EXPORTED_RUNTIME_METHODS=@../binding/exported-runtime-functions.txt
9+
-s EXPORTED_FUNCTIONS=@../binding/exported-functions.txt
10+
-O2
11+
-flto
12+
--closure 1
13+
-s MODULARIZE=1
14+
-s SINGLE_FILE=1

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"version": "0.7.0-dev",
44
"description": "WebAssembly-based libxml2 javascript wrapper",
55
"scripts": {
6-
"bind": "cd out && emcc -L.libs -lxml2 -o libxml2raw.mjs --no-entry -s EXPORT_ES6=1 -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 -s EXPORTED_RUNTIME_METHODS=@../binding/exported-runtime-functions.txt -s EXPORTED_FUNCTIONS=@../binding/exported-functions.txt -O2 -flto --closure 1 -s MODULARIZE=1 -s SINGLE_FILE=1",
6+
"bind": "cd out && emcc @../binding/emcc.txt",
77
"build": "npm run wasm && npm run tsc",
88
"build:debug": "EMCC_CFLAGS=\"-g -O0\" npm run build",
99
"clean": "rm -rf lib out .tsbuildinfo",
1010
"compile": "cd out && emmake make -j4",
11-
"config": "cd out && emconfigure ../libxml2/autogen.sh --with-winpath --without-python --without-http --without-sax1 --without-modules --without-html --without-threads --without-zlib --without-lzma --without-catalog --without-debug --without-legacy --disable-shared --enable-static CFLAGS='-O2'",
11+
"config": "cd out && emconfigure ../libxml2/autogen.sh --with-winpath --without-sax1 --without-modules --without-html --without-threads --without-catalog --without-debug --disable-shared --enable-static CFLAGS='-O2'",
1212
"cov": "c8 npm run unit",
1313
"dist": "cp out/libxml2raw.* src/libxml2raw.* lib",
1414
"doc": "typedoc",

0 commit comments

Comments
 (0)