How to install lessc on wercker
Want to compile your LESS assets on werker?
wercker/python box does not have a LESS compiler available. To install
lessc you must first install npm but when I tried to execute
curl http://npmjs.org/install.sh | sh on wercker the script reported some errors (which I didn’t record and now can’t reproduce).
Use the following
script to install
lessc on wercker:
box: wercker/python build: steps: - script: name: "install lessc" code: |- curl https://npmjs.org/install.sh | sudo bash sudo npm install less -g
lessc can also be installed locally (not using sudo) if you prefer. In this case as the box is short lived using sudo should be fine.
box: wercker/python build: steps: - script: name: "install lessc locally" curl https://npmjs.org/install.sh | npm_config_prefix=~/local sh ~/local/bin/npm install less # ~/node_modules/.bin/lessc -v
Also available as a GitHub Gist.