Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/segment-boneyard/node-sass-wrapper
A wrapper around the command line Sass gem.
https://github.com/segment-boneyard/node-sass-wrapper
Last synced: about 5 hours ago
JSON representation
A wrapper around the command line Sass gem.
- Host: GitHub
- URL: https://github.com/segment-boneyard/node-sass-wrapper
- Owner: segment-boneyard
- Created: 2013-02-25T10:32:31.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-28T16:06:19.000Z (over 11 years ago)
- Last Synced: 2024-11-01T20:25:52.264Z (14 days ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 9
- Watchers: 38
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-sass-wrapper
`node-sass-wrapper` is a wrapper around the command line Sass gem.
## Install
$ npm install node-sass-wrapper## Example
Call `compile` with the path to your Sass stylesheet:
```js
var sass = require('node-sass-wrapper');sass.compile('path/to/style.sass', function (err, css) {
if (err) throw err;
fs.writeFileSync('path/to/style.css', css);
});
```You can also pass in options:
```js
var sass = require('node-sass-wrapper');var options = {
compass : true,
style : 'compact'
};sass.compile('path/to/style.sass', options, function (err, css) {
if (err) throw err;
fs.writeFileSync('path/to/style.css', css);
});
```## API
### compile(path, [options], callback)
Compile the Sass file at `path` and `callback(err, css)`. `options` are optional and map directly to their command line equivalents:
```js
{
compass : false,
loadPath : null,
noCache : false,
precision : 3,
require : null,
style : 'nested'
}
```
## LicenseMIT
_Based on [@ckhampus](https://github.com/ckhampus)'s [node-sass](https://github.com/ckhampus/node-sass)._