mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] tools: rename extras into tools
This commit is contained in:
+1
-1
@@ -23,4 +23,4 @@ package-lock.json
|
|||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
# Extras temp file
|
# Extras temp file
|
||||||
/extras/owl.js
|
/tools/owl.js
|
||||||
@@ -71,8 +71,8 @@ Some npm scripts are available:
|
|||||||
| `npm run minify` | minify the prebuilt owl.js file |
|
| `npm run minify` | minify the prebuilt owl.js file |
|
||||||
| `npm run test` | run all tests |
|
| `npm run test` | run all tests |
|
||||||
| `npm run test:watch` | run all tests, and keep a watcher |
|
| `npm run test:watch` | run all tests, and keep a watcher |
|
||||||
| `npm run extras` | build extras applications, start a static server (see [here](extras/readme.md)) |
|
| `npm run tools` | build tools applications, start a static server (see [here](tools/readme.md)) |
|
||||||
| `npm run extras:watch` | same as `extras`, but with a watcher to rebuild owl |
|
| `npm run tools:watch` | same as `tools`, but with a watcher to rebuild owl |
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
# 🦉 Tooling 🦉
|
# 🦉 Tooling 🦉
|
||||||
|
|
||||||
|
|
||||||
|
To help work/improve/learn with OWL, we have here:
|
||||||
|
|
||||||
|
- a benchmarks application
|
||||||
|
- a playground application
|
||||||
|
|
||||||
|
Both of them 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:
|
||||||
|
`npm run extras` (and its version with a watcher: `npm run extras: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
|
||||||
@@ -16,3 +27,14 @@ 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.
|
||||||
|
|
||||||
|
## Benchmarks
|
||||||
|
|
||||||
|
The benchmarks application is a very small application, implemented in different
|
||||||
|
frameworks, and in different versions of Owl. This is a simple internal tool,
|
||||||
|
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/).
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
# 🦉 Extra Stuff 🦉
|
|
||||||
|
|
||||||
To help work/improve/learn with OWL, we have here:
|
|
||||||
|
|
||||||
- a benchmarks application
|
|
||||||
- a playground application
|
|
||||||
|
|
||||||
Both of them 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:
|
|
||||||
`npm run extras` (and its version with a watcher: `npm run extras:watch`).
|
|
||||||
|
|
||||||
## Benchmarks
|
|
||||||
|
|
||||||
The benchmarks application is a very small application, implemented in different
|
|
||||||
frameworks, and in different versions of Owl. This is a simple internal tool,
|
|
||||||
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/).
|
|
||||||
+4
-4
@@ -10,10 +10,10 @@
|
|||||||
"minify": "uglifyjs dist/owl.js -o dist/owl.min.js --compress --mangle",
|
"minify": "uglifyjs dist/owl.js -o dist/owl.min.js --compress --mangle",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"extras:serve": "python3 extras/server.py || python extras/server.py",
|
"tools:serve": "python3 tools/server.py || python tools/server.py",
|
||||||
"extras": "npm run build && npm run extras:serve",
|
"tools": "npm run build && npm run tools:serve",
|
||||||
"preextras:watch": "npm run build",
|
"pretools:watch": "npm run build",
|
||||||
"extras:watch": "npm-run-all --parallel extras:serve \"build:* -- --watch\""
|
"tools:watch": "npm-run-all --parallel tools:serve \"build:* -- --watch\""
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Vendored
@@ -6,7 +6,7 @@ from http.server import SimpleHTTPRequestHandler, HTTPServer
|
|||||||
|
|
||||||
HOST = '127.0.0.1'
|
HOST = '127.0.0.1'
|
||||||
PORT = 8000
|
PORT = 8000
|
||||||
URL = 'http://{0}:{1}/extras'.format(HOST, PORT)
|
URL = 'http://{0}:{1}/tools'.format(HOST, PORT)
|
||||||
|
|
||||||
|
|
||||||
# We define our own handler here to remap owl.js GET requests to the Owl build
|
# We define our own handler here to remap owl.js GET requests to the Owl build
|
||||||
@@ -15,7 +15,7 @@ URL = 'http://{0}:{1}/extras'.format(HOST, PORT)
|
|||||||
# we want to update the playground.
|
# we want to update the playground.
|
||||||
class OWLHandler(SimpleHTTPRequestHandler):
|
class OWLHandler(SimpleHTTPRequestHandler):
|
||||||
def do_GET(self):
|
def do_GET(self):
|
||||||
if self.path == '/extras/owl.js':
|
if self.path == '/tools/owl.js':
|
||||||
self.path = '/dist/owl.js'
|
self.path = '/dist/owl.js'
|
||||||
return SimpleHTTPRequestHandler.do_GET(self)
|
return SimpleHTTPRequestHandler.do_GET(self)
|
||||||
|
|
||||||
Reference in New Issue
Block a user