Last active
September 27, 2016 21:41
-
-
Save chrisforrette/95861ac35882c10c554d to your computer and use it in GitHub Desktop.
CircleCI Libsass Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
cache_directories: | |
- sassc | |
- libsass | |
post: | |
- if [[ ! -e sassc ]]; then git clone [email protected]:sass/sassc.git sassc; fi | |
- if [[ ! -e libsass ]]; then git clone --recursive [email protected]:sass/libsass.git && cd sassc && export SASS_LIBSASS_PATH=$(readlink -f ../libsass) && make && cd ..; fi | |
- ln -s sassc/bin/sassc ~/bin/sassc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a chunk of configuration to drop in to a CircleCI YAML file (see here for configuration documentation). This pulls down SassC and Libsass manually from their respective Github repositories and sets them up to be followed up with something like node-sass to compile Sass files with Libsass.
The
cache_directories
stanza ensures that the Git clone process doesn't need to take place for every single build.At Jolby we hook into the
deployment
stanza where we would run an NPM script to build the CSS. Something like this would sit inpackage.json
:And in our
circleci.yml
we would add something like this:The
fab ...
command leverages Fabric, running astaging
command to point any subsequent commands at staging server(s), followed by abuild
command that would triggernpm run build:css
, along with other build process such as Javascript compilation, followed by adeploy
command that sends over the bundled up build artifacts to the server viarsync
or something similar, followed by a restart or something along those lines.