[IMP] owl: add extras:watch task

closes #118
This commit is contained in:
Géry Debongnie
2019-05-17 23:22:54 +02:00
parent a1d7e6c987
commit c2c7997df3
3 changed files with 13 additions and 14 deletions
+9 -8
View File
@@ -64,14 +64,15 @@ If you want to use a simple `<script>` tag, the last release can be downloaded h
Some npm scripts are available: Some npm scripts are available:
| Command | Description | | Command | Description |
| -------------------- | ------------------------------------------------------------------------------- | | ---------------------- | ------------------------------------------------------------------------------- |
| `npm install` | install every dependency required for this project | | `npm install` | install every dependency required for this project |
| `npm run build` | build a bundle of _owl_ in the _/dist/_ folder | | `npm run build` | build a bundle of _owl_ in the _/dist/_ folder |
| `npm run minify` | minify the prebuilt owl.js file | | `npm run minify` | minify the prebuilt owl.js file |
| `npm run test` | run all tests | | `npm run test` | run all tests |
| `npm run test:watch` | run all tests, and keep a watcher | | `npm run test:watch` | run all tests, and keep a watcher |
| `npm run extras` | build extras applications, start a static server (see [here](extras/readme.md)) | | `npm run extras` | build extras applications, start a static server (see [here](extras/readme.md)) |
| `npm run extras:watch` | same as `extras`, but with a watcher to rebuild owl |
## Documentation ## Documentation
+1 -1
View File
@@ -7,7 +7,7 @@ To help work/improve/learn with OWL, we have here:
Both of them can be accessed by using a static http server. A simple python Both of them can be accessed by using a static http server. A simple python
server is available in `server.py`. There is also a npm script to start it: server is available in `server.py`. There is also a npm script to start it:
`npm run extras`. `npm run extras` (and its version with a watcher: `npm run extras:watch`).
## Benchmarks ## Benchmarks
+3 -5
View File
@@ -5,16 +5,14 @@
"main": "src/index.ts", "main": "src/index.ts",
"scripts": { "scripts": {
"build:js": "tsc --target esnext --module es6 --outDir dist/owl src/*", "build:js": "tsc --target esnext --module es6 --outDir dist/owl src/*",
"build:js:es5": "tsc --target es5 --module es6 --outDir dist/owl src/*",
"build:bundle": "rollup -c", "build:bundle": "rollup -c",
"build": "npm run build:js && npm run build:bundle", "build": "npm run build:js && npm run build:bundle",
"build:es5": "npm run build:js:es5 && npm run build:bundle",
"minify": "uglifyjs dist/owl.js -o dist/owl.min.js --compress --mangle", "minify": "uglifyjs dist/owl.js -o dist/owl.min.js --compress --mangle",
"dev": "npm-run-all --parallel \"build:* -- --watch\"",
"test": "jest", "test": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"preextras": "npm run build", "extras:serve": "python extras/server.py",
"extras": "python extras/server.py" "extras": "npm run build && npm run extras:serve",
"extras:watch": "npm-run-all --parallel extras:serve \"build:* -- --watch\""
}, },
"repository": { "repository": {
"type": "git", "type": "git",