Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Install Sass in the Docker base image
Browse files Browse the repository at this point in the history
* Install node-sass in Dockerfile-base
* Update Makefile "echo" for "compilecss" step
* Update node-sass call to use "--source-map true"
  (see sass/node-sass#1026)
  • Loading branch information
escattone committed Jan 26, 2017
1 parent 3550020 commit 99b9357
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN npm install -g \
cssmin@0.4.3 \
csslint@0.10.0 \
jshint@2.7.0 \
stylus@0.49.2 \
node-sass@4.3.0 \
uglify-js@2.4.13 \
clean-css@3.4.23
ENV PIPELINE_CSS_COMPRESSOR=pipeline.compressors.cssmin.CSSMinCompressor \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ locust:
locust -f tests/performance/smoke.py --host=https://developer.allizom.org

compilecss:
@ echo "## Compiling Stylus files to CSS ##"
@ echo "## Compiling Sass files to CSS ##"
@ ./scripts/compile-stylesheets

compilejsi18n:
Expand Down
8 changes: 4 additions & 4 deletions scripts/compile-stylesheets
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ STYLESHEETS=($SASSDIR/*.scss)
if [ $WATCH ]; then
echo Watching and automatically compiling stylesheets

# Using $STYLESHEETS directly so that sass only watches each stylesheet
# Using $STYLESHEETS directly so that node-sass only watches each stylesheet
# once, even if it is @included multiple times.
if [ $QUIET ]; then
(node-sass ${STYLESHEETS[@]} --output $CSSDIR --precision 3 --source-map --watch &) &> /dev/null
(node-sass ${STYLESHEETS[@]} --output $CSSDIR --precision 3 --source-map true --watch &) &> /dev/null
else
node-sass ${STYLESHEETS[@]} --output $CSSDIR --precision 3 --source-map --watch
node-sass ${STYLESHEETS[@]} --output $CSSDIR --precision 3 --source-map true --watch
fi
else
# Iterating through stylesheets so that shell output is immediate.
for ss in ${STYLESHEETS[@]}; do
node-sass $ss --output $CSSDIR --precision 3 --source-map
node-sass $ss --output $CSSDIR --precision 3 --source-map true
done
fi

0 comments on commit 99b9357

Please sign in to comment.