diff --git a/extras/playground/app.js b/extras/playground/app.js index 5c3ec3df..1bc6ed24 100644 --- a/extras/playground/app.js +++ b/extras/playground/app.js @@ -153,7 +153,7 @@ owl.utils.whenReady(startApp);`; class App extends owl.Component { constructor(...args) { super(...args); - this.version = owl._version; + this.version = owl.__info__.version; this.SAMPLES = SAMPLES; this.widgets = { TabbedEditor }; @@ -349,7 +349,7 @@ class TabbedEditor extends owl.Component { //------------------------------------------------------------------------------ // Application initialization //------------------------------------------------------------------------------ -document.title = `${document.title} (v${owl._version})`; +document.title = `${document.title} (v${owl.__info__.version})`; document.addEventListener("DOMContentLoaded", async function() { const templates = await owl.utils.loadTemplates("templates.xml"); const qweb = new owl.QWeb(templates); diff --git a/rollup.config.js b/rollup.config.js index cf0f7171..59eae6d1 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -9,6 +9,6 @@ export default { format: "iife", name: "owl", extend: true, - outro: `exports._version = '${version}';\nexports._date = '${new Date().toISOString()}';\nexports._hash = '${git.short()}';\nexports._url = 'https://github.com/odoo/owl';` + outro: `exports.__info__.version = '${version}';\nexports.__info__.date = '${new Date().toISOString()}';\nexports.__info__.hash = '${git.short()}';\nexports.__info__.url = 'https://github.com/odoo/owl';` } }; diff --git a/src/index.ts b/src/index.ts index 1353d133..dfccbf1e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,5 +17,7 @@ export { QWeb } from "./qweb_core"; export { connect, Store } from "./store"; import * as _utils from "./utils"; +export const __info__ = {} + export const utils = _utils;