mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
improve demo tasks, add a live server and update readme
This commit is contained in:
@@ -2,17 +2,37 @@
|
|||||||
|
|
||||||
This is a POC, not at all production ready code!!!
|
This is a POC, not at all production ready code!!!
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
|
```
|
||||||
npm run test
|
npm run test
|
||||||
npm run test:watch
|
npm run test:watch
|
||||||
|
```
|
||||||
## Build code bundles
|
## Build code bundles
|
||||||
|
|
||||||
|
```
|
||||||
npm run bundle:core
|
npm run bundle:core
|
||||||
npm run bundle:core:watch
|
npm run bundle:core:watch
|
||||||
|
```
|
||||||
|
|
||||||
## Demo page
|
## Demo page
|
||||||
|
|
||||||
npm run demo
|
There are three commands that can be used to play with the demo application:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run demo:build
|
||||||
|
npm run demo:watch
|
||||||
|
npm run demo:serve
|
||||||
|
```
|
||||||
|
|
||||||
|
- *build* prepare a folder with all the static files compiled. It is located in
|
||||||
|
dist/demo
|
||||||
|
- *watch* recompile the typescript files as soon as they are changed
|
||||||
|
- *serve* starts a live-server pointing to the dist/demo (which will reload the
|
||||||
|
page whenever the files are changed)
|
||||||
+7
-4
@@ -7,9 +7,12 @@
|
|||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"bundle:core": "tsc -m es6 --lib es2017,dom --target esnext --outdir dist src/bundles/core.ts && rollup dist/bundles/core.js --file dist/bundle-core.js --format iife",
|
"bundle:core": "tsc -m es6 --lib es2017,dom --target esnext --outdir dist src/bundles/core.ts && rollup dist/bundles/core.js --file dist/bundle-core.js --format iife",
|
||||||
"bundle:core:watch": "nodemon -w src -e ts -x 'npm run bundle:core'",
|
"bundle:core:watch": "npm run bundle:core -- --watch",
|
||||||
"demo": "cp -r demo/ dist/demo && tsc -m amd --lib es2017,dom --target esnext --outfile dist/demo/main.js demo/src/main.ts",
|
"demo:build": "cp -r demo/ dist/demo && npm run demo:build:js",
|
||||||
"postdemo": "open dist/demo/index.html"
|
"demo:build:js": "tsc -m amd --lib es2017,dom --target esnext --outfile dist/demo/main.js demo/src/main.ts",
|
||||||
|
"predemo:watch": "npm run demo:build",
|
||||||
|
"demo:watch": "npm run demo:build:js -- --watch",
|
||||||
|
"demo:serve": "live-server dist/demo/"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -24,11 +27,11 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^23.3.12",
|
"@types/jest": "^23.3.12",
|
||||||
"jest": "^23.6.0",
|
"jest": "^23.6.0",
|
||||||
"nodemon": "^1.18.9",
|
|
||||||
"rollup": "^1.1.0",
|
"rollup": "^1.1.0",
|
||||||
"rollup-plugin-typescript2": "^0.19.0",
|
"rollup-plugin-typescript2": "^0.19.0",
|
||||||
"source-map-support": "^0.5.10",
|
"source-map-support": "^0.5.10",
|
||||||
"ts-jest": "^23.10.5",
|
"ts-jest": "^23.10.5",
|
||||||
|
"live-server": "^1.2.1",
|
||||||
"typescript": "^3.2.2"
|
"typescript": "^3.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user