Background: Our build and dev workflow (e.g. minifying, bundling, and linting) currently relies on a set of Python scripts.
Goal: Adopt javascript/node.js build and testing tools.
Opportunity: By adopting node.js build tools, we can use better tooling adopted by the general Javascript community.
Benefits:
- Take advantage of better tooling developed by the JS community. For example, instead of relying on rjsmin.py, we can use a more powerful tool like UglifyJS to minify our code.
- Reduce maintenance of python scripts. We can convert files like lint_javascript.py into simple npm scripts (e.g. "eslint -c front_end/.eslintrc.js --ignore-path front_end/.eslintignore front_end").
- Make the project more friendly for external contributors. Javascript developers who are not familiar with Python may find it easier to contribute. Even developers familiar with Python can benefit as they may have used popular open-source JS tools.
Steps:
1. Create a buildbot recipe that installs a local copy of node.js/npm and copy npm modules from our npm repo[1] to run eslint and closure compiler (available as an npm module). Initially run this on the FYI waterfall (i.e. won't block any builds).
2. Once the recipe has been confirmed to be running smoothly, adopt it for the main waterfall. At this point, we should make eslint mandatory in our presubmit check (currently it's skipped if eslint is not installed).
3. Work with infra team to get node.js LTS version installed on the build bot.
4. Investigate additional node.js tooling that devtools can benefit from (e.g. unit testing, minifying).
[1] https://chromium.googlesource.com/deps/third_party/npm_modules
Background: Our build and dev workflow (e.g. minifying, bundling, and linting) currently relies on a set of Python scripts.
Goal: Adopt javascript/node.js build and testing tools.
Benefits:
- Take advantage of better tooling developed by the JS community. For example, instead of relying on rjsmin.py, we can use a more powerful tool like UglifyJS to minify our code.
- Reduce maintenance of python scripts. We can convert files like lint_javascript.py into simple npm scripts (e.g. "eslint -c front_end/.eslintrc.js --ignore-path front_end/.eslintignore front_end").
- Make the project more friendly for external contributors. Javascript developers who are not familiar with Python may find it easier to contribute. Even developers familiar with Python can benefit as they may have used popular open-source JS tools.
Steps:
1. Create a buildbot recipe that installs a local copy of node.js/npm and copy npm modules from our npm repo[1] to run eslint and closure compiler (available as an npm module). Initially run this on the FYI waterfall (i.e. won't block any builds).
2. Once the recipe has been confirmed to be running smoothly, adopt it for the main waterfall. At this point, we should make eslint mandatory in our presubmit check (currently it's skipped if eslint is not installed).
3. Work with infra team to get node.js LTS version installed on the build bot.
4. Investigate additional node.js tooling that devtools can benefit from (e.g. unit testing, minifying).
[1] https://chromium.googlesource.com/deps/third_party/npm_modules
Background: Our build and dev workflow (e.g. minifying, bundling, and linting) currently relies on a set of Python scripts.
Goal: Adopt javascript/node.js build and testing tools.
Benefits:
- Take advantage of better tooling developed by the JS community. For example, instead of relying on rjsmin.py, we can use a more powerful tool like UglifyJS to minify our code.
- Reduce maintenance of python scripts.
- Make the project more friendly for external contributors. Javascript developers who are not familiar with Python may find it easier to contribute. Even developers familiar with Python can benefit as they may have used popular open-source JS tools.
Steps:
1. Create a buildbot recipe that installs a local copy of node.js/npm and copy npm modules from our npm repo[1] to run eslint and closure compiler (available as an npm module). Initially run this on the FYI waterfall (i.e. won't block any builds).
2. Once the recipe has been confirmed to be running smoothly, adopt it for the main waterfall. At this point, we should make eslint mandatory in our presubmit check (currently it's skipped if eslint is not installed).
3. Work with infra team to get node.js LTS version installed on the build bot.
4. Investigate additional node.js tooling that devtools can benefit from (e.g. unit testing, minifying).
[1] https://chromium.googlesource.com/deps/third_party/npm_modules
Comment 1 by chenwilliam@chromium.org
, Aug 29 2016