Installing npm packages
If your project depends on npm packages, you can install them in the Virtual Machine before performing an analysis. To do so, edit your project configuration and install the package using the pre_composer_script option:
1 2 3
pre_composer_script: |
#!/bin/bash
npm install -g <package-name>
How can I install Bower?
To install Bower, you need to install its npm package but also to configure the PATH so you can use it in your project:
1 2 3 4 5 6 7 8
pre_composer_script: |
#!/bin/bash
# install Bower
npm install -g bower
# make Bower available on the PATH
export PATH=/opt/node_modules/bin:$PATH
How can I install Less?
To install Less, you need to install its npm package but also to configure the PATH so you can use it in your project:
1 2 3 4 5 6 7 8
pre_composer_script: |
#!/bin/bash
# install Bower
npm install -g less
# make Bower available on the PATH
export PATH=/opt/node_modules/bin:$PATH