-
-
Save am11/9f429c211822a9b15aee to your computer and use it in GitHub Desktop.
node-sass installation script (Linux/Mac)
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
mkdir ~/temp1 | |
cd ~/temp1 | |
# diagnostic information | |
npm -v | |
node -v | |
node -p process.versions | |
node -p process.platform | |
node -p process.arch | |
# installation | |
npm install node-sass | |
# if installed successfully | |
./node_modules/.bin/node-sass --version | |
# if version is < 3.0.0 | |
node -p "console.log(require('node-sass').info())" | |
# if version is > 3.0.0 | |
node -p "console.log(require('node-sass').info)" | |
# else if it fails | |
cd node_modules/node-sass/vendor | |
# delete darwin-or-linux<something>\binding.node file and | |
# download the appropriate file in that directory manually from: | |
# https://github.com/sass/node-sass-binaries/ | |
# | |
# (for instance: https://github.com/sass/node-sass-binaries/tree/v2.1.1) | |
node -p "console.log(require('node-sass').info)" | |
# once this is done, delete ~/temp1 | |
rm -r ~/temp1 |
mkdir /temp1 requires root access.... Suggest using something in the home directory instead.
@RobLoach, thanks. It's fixed.
@WebAzOps, node-sass is a node.js package that compiles Sass code to CSS using a native library called libsass.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Windows, see https://gist.github.com/am11/e5de3c49c219f0811e1d.