mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
imp: adapt build scripts to allow ES5 output
This commit is contained in:
@@ -32,13 +32,14 @@ client will ever be converted to typescript (even though I would really like it)
|
|||||||
|
|
||||||
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 build:es5 | build a bundle of _owl_ in the _/dist/_ folder (ES5 code) |
|
||||||
| npm run test | run all tests |
|
| npm run minify | minify the prebuilt owl.js file |
|
||||||
| npm run test:watch | run all tests, and keep a watcher |
|
| npm run test | run all tests |
|
||||||
|
| npm run test:watch | run all tests, and keep a watcher |
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -4,9 +4,11 @@
|
|||||||
"description": "Odoo Web Lab",
|
"description": "Odoo Web Lab",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:js": "tsc --lib es2017,dom --target esnext --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\"",
|
"dev": "npm-run-all --parallel \"build:* -- --watch\"",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
|
|||||||
+1
-2
@@ -3,11 +3,10 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
"lib": ["es2015", "dom"],
|
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"inlineSourceMap": true,
|
"inlineSourceMap": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"target": "es6",
|
"target": "es5",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"alwaysStrict": true,
|
"alwaysStrict": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user