Changes between Version 13 and Version 14 of Ticket #5559


Ignore:
Timestamp:
08/25/2017 09:13:53 AM (3 years ago)
Author:
tlucas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5559 – Description

    v13 v14  
    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 `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. 
     4We would like the `ensure_dependencies.py` script to call `npm install --only=production --loglevel=warn` 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 === 
    7 - 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: 
     7- Change the `ensure_dependencies.py` script so that it calls `npm install --only=production --loglevel=warn` after a dependency is cloned or updated, but only if the following is true: 
    88  - the dependency has a `package.json` file in its root 
    99  - the `package.json` file has a non-empty `"dependencies"` section 
     
    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=== Integration notes === 
     15In any repository dependent on `buildtools`, you will have to run 
     16{{{ 
     17python ensure_dependencies.py 
     18}}} 
     19once for it to update itself, prior to any other action that would involve `ensure_dependencies.py` (e.g. any `build.py` command). 
     20This ensures - when updating to a `buildtools`-revision which includes Node.js npm dependencies (e.g. #5560) - that the dependencies are actually resolved.