Skip to content

Commit e1ac558

Browse files
author
Thorsten Bux
authored
Merge pull request #26 from jeromeetienne/npm-support-standardized
added support for 'npm run watch'
2 parents 8510249 + 686d615 commit e1ac558

File tree

5 files changed

+12080
-12282
lines changed

5 files changed

+12080
-12282
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
doc/reference
2+
node_modules

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ Emscripten port of [ARToolKit](https://github.com/artoolkit/artoolkit5) to JavaS
2626
3. Building
2727
1. Make sure `EMSCRIPTEN` env variable is set (e.g. `EMSCRIPTEN=/usr/lib/emsdk_portable/emscripten/master/ node tools/makem.js`
2828
2. Rename the `ARTOOLKIT5_ROOT/include/AR/config.h.in` file to `config.h`
29-
3. Run `node tools/makem.js`
29+
3. Run `node run build`
30+
31+
During developement, you can run ```node run watch```, it will rebuild the library everytime you change ```./js/``` directory.
3032

3133
4. The built ASM.js files are in `/build`. There's a build with debug symbols in `artoolkit.debug.js` and the optimized build with bundled JS API in `artoolkit.min.js`.
3234

build/artoolkit.debug.js

Lines changed: 12058 additions & 12267 deletions
Large diffs are not rendered by default.

build/artoolkit.min.js

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@
2121
"grunt": "^0.4.5",
2222
"grunt-jsdoc": "^1.1.0",
2323
"ink-docstrap": "^1.1.4",
24-
"jsdoc": "^3.4.0"
24+
"jsdoc": "^3.4.0",
25+
"watch": "^0.18.0"
2526
},
26-
"license": "LGPL-3.0",
27-
"scripts": {}
27+
"scripts": {
28+
"build": "node tools/makem.js; echo Built at `date`",
29+
"watch": "./node_modules/.bin/watch 'npm run build' ./js/"
30+
},
31+
"license": "LGPL-3.0"
2832
}

0 commit comments

Comments
 (0)