mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] owl: move metadata into __info__
This differentiate better metadata and owl exported values. Also, and this is the goal, it gives a space to add extra keys in the future.
This commit is contained in:
@@ -153,7 +153,7 @@ owl.utils.whenReady(startApp);`;
|
|||||||
class App extends owl.Component {
|
class App extends owl.Component {
|
||||||
constructor(...args) {
|
constructor(...args) {
|
||||||
super(...args);
|
super(...args);
|
||||||
this.version = owl._version;
|
this.version = owl.__info__.version;
|
||||||
this.SAMPLES = SAMPLES;
|
this.SAMPLES = SAMPLES;
|
||||||
this.widgets = { TabbedEditor };
|
this.widgets = { TabbedEditor };
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ class TabbedEditor extends owl.Component {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Application initialization
|
// Application initialization
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
document.title = `${document.title} (v${owl._version})`;
|
document.title = `${document.title} (v${owl.__info__.version})`;
|
||||||
document.addEventListener("DOMContentLoaded", async function() {
|
document.addEventListener("DOMContentLoaded", async function() {
|
||||||
const templates = await owl.utils.loadTemplates("templates.xml");
|
const templates = await owl.utils.loadTemplates("templates.xml");
|
||||||
const qweb = new owl.QWeb(templates);
|
const qweb = new owl.QWeb(templates);
|
||||||
|
|||||||
+1
-1
@@ -9,6 +9,6 @@ export default {
|
|||||||
format: "iife",
|
format: "iife",
|
||||||
name: "owl",
|
name: "owl",
|
||||||
extend: true,
|
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';`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,5 +17,7 @@ export { QWeb } from "./qweb_core";
|
|||||||
export { connect, Store } from "./store";
|
export { connect, Store } from "./store";
|
||||||
import * as _utils from "./utils";
|
import * as _utils from "./utils";
|
||||||
|
|
||||||
|
export const __info__ = {}
|
||||||
|
|
||||||
|
|
||||||
export const utils = _utils;
|
export const utils = _utils;
|
||||||
|
|||||||
Reference in New Issue
Block a user