https://github.com/badsyntax/sass-wrapper
[deprecated/not maininted] A nodejs module that provides a friendly javascript API for interacting with sass
https://github.com/badsyntax/sass-wrapper
Last synced: 10 months ago
JSON representation
[deprecated/not maininted] A nodejs module that provides a friendly javascript API for interacting with sass
- Host: GitHub
- URL: https://github.com/badsyntax/sass-wrapper
- Owner: badsyntax
- License: mit
- Created: 2013-06-25T17:47:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-13T14:30:11.000Z (over 11 years ago)
- Last Synced: 2025-02-15T05:15:01.245Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 230 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# sass-wrapper [](https://travis-ci.org/badsyntax/sass-wrapper)
A nodejs module that provides a friendly javascript API for compiling sass. This module is simply a wrapper
around the sass utility, and thus you need to have sass installed on your system to use this module.
** THIS MODULE IS DEPRECATED AND NOT MAINTAINED **
## Example
```javascript
var sass = require('sass-wrapper');
// You can specify a filepath to compile...
sass.compile({
filepath: 'styles.scss',
callback: function(err, data) {
if (err) {
console.log(err);
throw err;
}
console.log(data);
}
});
// Or pass in a string of sass...
sass.compile({
data: '.mysass{.important{color:red;}}',
type: 'scss', // {optional} 'scss' or 'sass' (defaults to 'scss')
callback: function(err, data) {
if (err) {
console.log(err);
throw err;
}
console.log(data);
}
});
```
## Options
```javascript
{
filepath: '/path/to/file.scss',
data: '.mysass{.style{color:red}}',
type: 'scss',
compass: true,
style: 'nested',
precision: 3,
loadPath: '/path/to/dir'
}
```
## Tests
Run the tests with `npm test` or `grunt test`.