From 7bd0b2fea0fab9d5baa8171d54ad6ccfdd9944bb Mon Sep 17 00:00:00 2001 From: Dylan Greene Date: Wed, 30 Oct 2013 16:00:16 -0400 Subject: [PATCH] added ENV option to skip the tests, updated docs --- README.md | 9 +++++++++ build.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 2012f9ae4..b60e85af7 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');