|
|
| Line 1: |
Line 1: |
| <font color=red><strong>This work of transitioning to Node.JS is currently on halt so to free up resource for the team to overhaul build steps. See [[Gaia/Build/NewBuildSystem]] for detail.</strong></font>
| |
|
| |
| = Overview = | | = Overview = |
|
| |
|
| Line 68: |
Line 66: |
| ** Bug ? - Refactor utils-node.js API and remove utils-xpc.js and utils.js | | ** Bug ? - Refactor utils-node.js API and remove utils-xpc.js and utils.js |
| ** Bug ? - Refactor all build/*.js to conform to node-style | | ** Bug ? - Refactor all build/*.js to conform to node-style |
|
| |
| == Milestone 3 ==
| |
|
| |
| The M3 goal is to simplify make Makefile into merely a compatibility layer for the existing commands, and move all the logic into external JavaScript-based build tools. By doing so it would improve the maintainability and readability of the build system. We tentatively choose [http://gulpjs.com/ Gulp.js] as target currently as it offers [https://github.com/gulpjs/gulp#incremental-builds incremental builds] and stream workflow.
| |
|
| |
| * '''Deliverable:''' Purge complex logic from Makefile and rely on an external JavaScript-based build tools for most of the complexities.
| |
| * '''Expected schedule:''' 8 weeks
| |
| * '''Breakdowns:'''
| |
| ** Extract Makefile logic into JS modules
| |
| ** Rewrite Makefile targets into JS
| |
| *** Task dependency - [https://www.npmjs.com/package/gulp gulp]
| |
| *** Parallel build - [https://www.npmjs.com/package/gulp-spawn gulp-spawn]
| |
| *** Incremental build
| |
| **** Watch file changes - [https://github.com/sindresorhus/gulp-changed gulp-changed]
| |
| **** File dependency resolving (speed up incremental build) [https://www.npmjs.com/package/gulp-resolve-dependencies gulp-resolve-dependencies]
| |
| *** Edit file content [https://www.npmjs.com/package/gulp-replace gulp-replace]
| |
| *** Support ES6 [https://www.npmjs.com/package/gulp-babel gulp-babel]
| |
| *** Minify
| |
| **** JS [https://www.npmjs.com/package/gulp-uglify gulp-uglify]
| |
| **** CSS [https://www.npmjs.com/package/gulp-minify-css gulp-minify-css]
| |
| **** HTML [https://www.npmjs.com/package/gulp-minify-html gulp-minify-html]
| |
| **** SVG [https://www.npmjs.com/package/gulp-svgmin gulp-svgmin]
| |
| **** Image [https://github.com/sindresorhus/gulp-imagemin gulp-imagemin]
| |
| *** Concatenate [https://www.npmjs.com/package/gulp-concat gulp-concat]
| |
| *** Package to zip [https://www.npmjs.com/package/gulp-zip gulp-zip]
| |
| *** Process everything in memory (remove build_stage) [https://github.com/gulpjs/gulp/blob/master/docs/recipes/make-stream-from-buffer.md make-stream-from-buffer]
| |
| ** Building parameters management
| |
| *** [https://github.com/gulpjs/gulp/blob/master/docs/recipes/using-external-config-file.md using-external-config-file]
| |
| *** [https://www.npmjs.com/package/parse-env parse-env]
| |
| *** [https://www.npmjs.com/package/config-manager config-manager]
| |
| ** Redesign build.js - A config file rather than lots of build processes
| |
| * '''Reference:'''
| |
| ** https://github.com/RickyChien/gaia-build
| |
| ** https://github.com/fxos/build
| |
|
| |
|
| = Q & A = | | = Q & A = |