mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] owl: introduce dev mode
This commit adds a static key 'dev' on QWeb (which acts as a central point of access in owl internal code), and a 'mode' key on the value exported by owl to let external code manipulate it. closes #117
This commit is contained in:
@@ -13,4 +13,5 @@
|
||||
## Miscellaneous
|
||||
- [Quick Start](quick_start.md)
|
||||
- [Animations](animations.md)
|
||||
- [Tooling](tooling.md)
|
||||
- [Comparison with React/Vue](comparison.md)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# 🦉 Tooling 🦉
|
||||
|
||||
## Development mode
|
||||
|
||||
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
|
||||
convenient to have better information on what is going on, this is the purpose
|
||||
of the dev mode.
|
||||
|
||||
Owl has a mode flag, in `owl.__info__.mode`. Its default value is `prod`, but
|
||||
it can be set to `dev`:
|
||||
|
||||
```js
|
||||
owl.__info__.mode = 'dev';
|
||||
```
|
||||
|
||||
Note that templates compiled with the `prod` settings will not be recompiled.
|
||||
So, changing this setting is best done at startup.
|
||||
Reference in New Issue
Block a user