diff --git a/README.md b/README.md index 341d0af2b..a4246d1a4 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,14 @@ Output will be saved with the same name as input SASS file into the current work --include-path Path to look for @import-ed files [default: cwd] --help, -h Print usage info +## Post-install Build + +Install runs a series of Mocha tests to see if your machine can use the pre-built `libsass` which will save some time during install. If any tests fail it will build from source. + +If you know the pre-built version will work and do not want to wait for the tests to run you can skip the tests by setting the environment variable `SKIP_NODE_SASS_TESTS` to true. + + SKIP_NODE_SASS_TESTS=true npm install + ## Contributors Special thanks to the following people for submitting patches: @@ -153,6 +161,7 @@ Dean Mao Brett Wilkins litek gonghao +Dylan Greene ### Note on Patches/Pull Requests diff --git a/build.js b/build.js index fe5d085b7..4980835c6 100644 --- a/build.js +++ b/build.js @@ -29,7 +29,7 @@ if (!{ia32: true, x64: true, arm: true}.hasOwnProperty(arch)) { // Test for pre-built library var modPath = platform + '-' + arch + '-v8-' + v8; -if (!force) { +if (!force && !process.env.SKIP_NODE_SASS_TESTS) { try { fs.statSync(path.join(__dirname, 'bin', modPath, 'binding.node')); console.log('`'+ modPath+ '` exists; testing');