We have a Clojure project setup with CircleCi 2.0. The CSS is written in Stylus.
We tried to use a Stylus Docker image to compile the CSS.
- run:
name: Build CSS
command: |
mkdir `pwd`/resources/public/css
docker run -it --rm \
-v `pwd`/src/css:/inputfiles \
-v `pwd`/resources/public/css:/outputfiles \
gruen/stylus /inputfiles/forecast.styl -o /outputfiles/forecast.css
It works on our local machines but not on CircleCI. For some reason the Stylus Docker image can’t mount the directory containing the Stylus source files
We then tried install and run stylus without Docker:
- run:
name: Build CSS
command: |
npm install -g stylus
stylus src/css -o resources/public/css
It can’t find npm because the primary image is Clojure.
What would be a suitable solution to compile the CSS?