mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[DOC] tooling: improve doc
This commit is contained in:
+29
-14
@@ -1,19 +1,28 @@
|
|||||||
# 🦉 Tooling 🦉
|
# 🦉 Tooling 🦉
|
||||||
|
|
||||||
|
## Content
|
||||||
|
|
||||||
To help work/improve/learn with OWL, we have here:
|
- [Overview](#overview)
|
||||||
|
- [Development Mode](#development-mode)
|
||||||
|
- [Playground](#playground)
|
||||||
|
- [Benchmarks](#benchmarks)
|
||||||
|
|
||||||
- a benchmarks application
|
## Overview
|
||||||
- a playground application
|
|
||||||
|
|
||||||
Both of them can be accessed by using a static http server. A simple python
|
To help work with/improve/learn OWL, there are a few extras tools/settings.
|
||||||
|
|
||||||
|
- development mode: enable better error reporting for the developer
|
||||||
|
- a playground application: a space to experiment and learn Owl.
|
||||||
|
- a benchmarks application: allow comparison with a few common frameworks
|
||||||
|
|
||||||
|
The two applications are available in the `tools/` folder, and can be accessed
|
||||||
|
by using a static http server. A simple python
|
||||||
server is available in `server.py`. There is also a npm script to start it:
|
server is available in `server.py`. There is also a npm script to start it:
|
||||||
`npm run extras` (and its version with a watcher: `npm run extras:watch`).
|
`npm run tools` (and its version with a watcher: `npm run tools:watch`).
|
||||||
|
|
||||||
|
## Development Mode
|
||||||
|
|
||||||
## Development mode
|
By default, Owl is in _production_ mode, this means that it will try to do its
|
||||||
|
|
||||||
By default, Owl is in *production* mode, this means that it will try to do its
|
|
||||||
job fast, and skip some expensive operations. However, in some cases, it is
|
job fast, and skip some expensive operations. However, in some cases, it is
|
||||||
convenient to have better information on what is going on, this is the purpose
|
convenient to have better information on what is going on, this is the purpose
|
||||||
of the dev mode.
|
of the dev mode.
|
||||||
@@ -22,19 +31,25 @@ Owl has a mode flag, in `owl.__info__.mode`. Its default value is `prod`, but
|
|||||||
it can be set to `dev`:
|
it can be set to `dev`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
owl.__info__.mode = 'dev';
|
owl.__info__.mode = "dev";
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that templates compiled with the `prod` settings will not be recompiled.
|
Note that templates compiled with the `prod` settings will not be recompiled.
|
||||||
So, changing this setting is best done at startup.
|
So, changing this setting is best done at startup.
|
||||||
|
|
||||||
|
## Playground
|
||||||
|
|
||||||
|
The playground is an important application designed to help learning and
|
||||||
|
experimenting with Owl. The last published version of Owl can be tested [online](https://odoo.github.io/owl/playground/).
|
||||||
|
|
||||||
|
It is an application similar to `jsFiddle`, but specialized for Owl: there are
|
||||||
|
three tabs (`js`, `css` and `xml`), and a simple button `Run` to execute that
|
||||||
|
code in an iframe.
|
||||||
|
|
||||||
## Benchmarks
|
## Benchmarks
|
||||||
|
|
||||||
|
Note: This is more an internal tool, useful for people working on Owl.
|
||||||
|
|
||||||
The benchmarks application is a very small application, implemented in different
|
The benchmarks application is a very small application, implemented in different
|
||||||
frameworks, and in different versions of Owl. This is a simple internal tool,
|
frameworks, and in different versions of Owl. This is a simple internal tool,
|
||||||
useful to compare various performance metrics on some tasks.
|
useful to compare various performance metrics on some tasks.
|
||||||
|
|
||||||
## Playground
|
|
||||||
|
|
||||||
The playground is an important application designed to help learning and
|
|
||||||
experimenting with Owl. It is available [online](https://odoo.github.io/owl/playground/).
|
|
||||||
|
|||||||
Reference in New Issue
Block a user