mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
improve library code generation, add versioning
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "web-core",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "Core Utils for Odoo Web Client",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -15,14 +15,14 @@
|
||||
"predev": "npm run build",
|
||||
"dev": "npm-run-all --parallel \"build:* -- --watch\" serve",
|
||||
"prepackage:core": "tsc --allowjs --lib es2017,dom --target esnext --outDir dist/core web/static/src/ts/core/*",
|
||||
"package:core": "rollup dist/core/src/ts/core/index.js --file dist/core.js --format umd --name \"odoocore\"",
|
||||
"package:core": "rollup -c",
|
||||
"postpackage:core": "uglifyjs dist/core.js -o dist/core.min.js --compress --mangle"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ged-odoo/web-core.git"
|
||||
},
|
||||
"author": "",
|
||||
"author": "Odoo",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ged-odoo/web-core/issues"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { version } from "./package.json";
|
||||
|
||||
// rollup.config.js
|
||||
export default {
|
||||
input: "dist/core/src/ts/core/index.js",
|
||||
output: {
|
||||
file: "dist/core.js",
|
||||
format: "iife",
|
||||
name: "odoo",
|
||||
extend: true,
|
||||
outro: `exports.core.version = '${version}';`
|
||||
}
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
export { QWeb } from "./qweb_vdom";
|
||||
export { EventBus } from "./event_bus";
|
||||
export { Component } from "./component";
|
||||
import { QWeb } from "./qweb_vdom";
|
||||
import { EventBus } from "./event_bus";
|
||||
import { Component } from "./component";
|
||||
|
||||
export const core = { QWeb, EventBus, Component };
|
||||
|
||||
Reference in New Issue
Block a user