-
-
Save am11/e5de3c49c219f0811e1d to your computer and use it in GitHub Desktop.
node-sass installation script (Windows)
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 win<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 | |
rmdir /s/q \temp1 | |
# or if you were using powershell | |
rm -r \temp1 |
Useful, but with node-sass 3.0.0-alpha.0, the command line is:
node -p "console.log(require('node-sass').info)"
(ie. info is a property, no longer a function)
@PhiLhoSoft, thanks. It's fixed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Linux/Mac, see https://gist.github.com/am11/9f429c211822a9b15aee.