Confirmed users
429
edits
Ricky Chien (talk | contribs) |
Ricky Chien (talk | contribs) No edit summary |
||
| Line 14: | Line 14: | ||
== Stage 0 == | == Stage 0 == | ||
Goal: Enable test suites for node build script. | |||
For finding out potential risks during node refactoring, we're going to enable build test suites for node.js beforehand, namely (Gbn/Gbun) in Treeherder and target on gaia-try, try and b2g-inbound. After that, the light of Gbn and Gbun will keep red for a while until stage 1 is finished. | For finding out potential risks during node refactoring, we're going to enable build test suites for node.js beforehand, namely (Gbn/Gbun) in Treeherder and target on gaia-try, try and b2g-inbound. After that, the light of Gbn and Gbun will keep red for a while until stage 1 is finished. | ||
=== Milestone === | |||
* Add RUN_ON_NODE switcher in Makefile for enabling node.js build script. | * Add RUN_ON_NODE switcher in Makefile for enabling node.js build script. | ||
| Line 23: | Line 26: | ||
== Stage 1 == | == Stage 1 == | ||
Goal: | |||
Focus on refactoring build system core functionality (parallel build, webapp-manifests, preferences, webapp-optimize, webapp-zip... etc). All of them exist certain specific code only use for XPCShell. Unfinished [http://nodejs.org/ Node.js] build script (build/node-utils.js) is already located in Gaia for a while (See also: {{Bug|955988}}. We should keep working on it and keep both Node and XPCShell compatible in build system. After completing stage 1, we will turn on run-node-command in Makefile to enable Node build script. | Focus on refactoring build system core functionality (parallel build, webapp-manifests, preferences, webapp-optimize, webapp-zip... etc). All of them exist certain specific code only use for XPCShell. Unfinished [http://nodejs.org/ Node.js] build script (build/node-utils.js) is already located in Gaia for a while (See also: {{Bug|955988}}. We should keep working on it and keep both Node and XPCShell compatible in build system. After completing stage 1, we will turn on run-node-command in Makefile to enable Node build script. | ||
=== Milestone === | |||
* | |||
== Stage 2 == | == Stage 2 == | ||
Goal: Using NPM modules to build up a pure JS build system instead of Makefile. | |||
In stage 2, we should build up a | |||
=== Milestone === | |||
== Stage 3 == | == Stage 3 == | ||
Until stage 1 and stage 2 are stable, we're going to remove all XPCShell API (utils-xpc.js) and refactor all build scripts into node-style. | Goal: Remove all legacies. | ||
Until stage 1 and stage 2 are stable, we're going to remove all XPCShell API (utils-xpc.js) and refactor all build scripts into node-style. In addition, get rid of b2g_sdk from build dependency. | |||
=== Milestone === | |||
* Get rid of b2g_sdk from build dependency. | |||
* Remove all XPCShell stuffs. | |||
** Refactor utils-node.js API and remove utils-xpc.js and utils.js | |||
** Refactor all build/*.js to conform to node-style. | |||
== Q & A == | == Q & A == | ||
| Line 40: | Line 64: | ||
:For node build system, requiring [http://nodejs.org/ Node.js] may be a little bit inconvenient. However, it won't frustrate many users to get started with hacking Gaia since Node provides a great installer for all platforms. After [http://nodejs.org/ Node.js] installed, we can build up new features quickly by NPM and also speed up rewriting Makefile to pure JS. On the other hand, try to rewrite Makefile from scratch in XULRunner seems not so easy. I'm pretty sure and still believe that NPM ecosystem will bring lots of benefits more than XULRunner. | :For node build system, requiring [http://nodejs.org/ Node.js] may be a little bit inconvenient. However, it won't frustrate many users to get started with hacking Gaia since Node provides a great installer for all platforms. After [http://nodejs.org/ Node.js] installed, we can build up new features quickly by NPM and also speed up rewriting Makefile to pure JS. On the other hand, try to rewrite Makefile from scratch in XULRunner seems not so easy. I'm pretty sure and still believe that NPM ecosystem will bring lots of benefits more than XULRunner. | ||