A starter template to create owl projects using bun. This is only a toy (around 300 loc), not production ready!
To create a new project:
bun create ged-odoo/owl-project-template [destination]
cd [destination]
bun dev # to start a dev server
The following scripts are available:
bun start: build all static assets in dist/ and start a server in production modebun dev to start a dev server, loading all static assets in memory from public/ (and with dev mode, autoreload and file watcher)bun run build to build all static assets into dist/ folderThis project template provides the following features:
src and injected into the pagemain.js is the main entry point. It checks for dev mode, and start the server accordinglycore/ is meant to contain the code that organize the application (so, a framework). This means:
    public/ is the location for the owl application code (the browser code). Note that all xml files will bepublic/app.html is the main page that will serve as index page.public/app.js is the main entry point for the owl applicationThe server located in core has the following routes:
/, it reads public/app.html and inject templates, and autoreload code (in dev mode)/app.js, it bundles all code in public/ using app.js as the entry point/owl.js, it returns the owl file from node_modulespublic/ (in dev mode) or dist/ (in prod mode)Here is the list of supported keys in app_config key in package.json:
port: the port that the server will listen topublic_path: the (relative) folder containing all the static code for the applicationbuild_path: the (relative) folder that will be used as target for the build processother_static_files: a description of all additional static files available to the server.
For example:
    {
  "other_static_files": {
    "milligram.css": "node_modules/milligram/dist/milligram.css"
  }
}
inline_css (default: false): if true, all css files in public_path will be concatenated and
injected in html page. Otherwise, a <link href="app.css"/> will be injected instead, and the /app.css
route will return the content of all css filesinline_xml (default: false): same as the css, but for all xml files