Changes between Version 10 and Version 11 of Ticket #5559


Ignore:
Timestamp:
08/23/2017 02:11:25 PM (3 years ago)
Author:
kzar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5559 – Description

    v10 v11  
    22We use [https://github.com/jsdoc3/jsdoc JSDoc] for document generation already, with #5535 we will use [https://webpack.github.io/ webpack] for builds too. Unfortunately our dependency management system does not allow for Node.js npm dependencies to be specified and so the user has to manually install them globally instead. 
    33 
    4 We would like the `ensure_dependencies.py` script to call `npm install --only=production` after a dependency is updated which contains a `packages.json` file. The `--only=production` argument avoids us installing development dependencies, for example `adblockpluscore` uses [https://github.com/caolan/nodeunit nodeunit] for its tests which we don't want `ensure_dependencies.py` to install. 
     4We would like the `ensure_dependencies.py` script to call `npm install --only=production` after a dependency is updated which contains a `package.json` file. The `--only=production` argument avoids us installing development dependencies, for example `adblockpluscore` uses [https://github.com/caolan/nodeunit nodeunit] for its tests which we don't want `ensure_dependencies.py` to install. 
    55 
    66=== What to change === 
    77- Change the `ensure_dependencies.py` script so that it calls `npm install --only=production` after a dependency is cloned or updated, but only if the following is true: 
    8   - the dependency has a `packages.json` file in its root 
    9   - the `packages.json` file has a non-empty `"dependencies"` section 
     8  - the dependency has a `package.json` file in its root 
     9  - the `package.json` file has a non-empty `"dependencies"` section 
    1010  - the `SKIP_DEPENDENCY_UPDATES` environment variable isn't set. 
    1111- The command should be called from the dependency's path. 
    1212- If the `npm` command doesn't exist a warning should be displayed 'Failed to install Node.js dependencies for DEPENDENCY_NAME, please ensure Node.js is installed.' 
    13  
    14 - Add a packages.json file with the following contents: 
    15  
    16 {{{ 
    17 { 
    18   "name": "buildtools", 
    19   "repository": "https://hg.adblockplus.org/buildtools", 
    20   "license": "GPL-3.0" 
    21 } 
    22 }}}