rebuild-node-sass
Rebuilds node-sass but only if needed
Last updated 3 years ago by bahmutov .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rebuild-node-sass 
SYNC missed versions from official npm registry.

rebuild-node-sass

Rebuilds node-sass but only if needed

NPM

Build status semantic-release

Use

npm install --save-dev rebuild-node-sass node-sass

Then before build (when node-sass is probably used), call rebuild-node-sass to make sure it is ready

{
  "scripts": {
    "prebuild": "rebuild-node-sass",
    "build": "..."
  }
}

Testing

To execute in a different environment, for example when working on Mac, we can install Mac Sass binary npm install and then switch to Docker

docker run -v $PWD:/src -w /src -it node /bin/bash

which produces the following output (abridged)

root@0d0cd593e320:/src# ./rebuild.sh
npm info it worked if it ends with ok
npm info using npm@5.0.0
npm info using node@v8.0.0
npm info ok
/src/node_modules/node-sass/lib/binding.js:15
      throw new Error(errors.missingBinary());
...
Binary found at /src/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
node-sass@4.5.3 /src/node_modules/node-sass

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

3 Versions

  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 10
Last Day 0
Last Week 9
Last Month 33
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |