https://github.com/snugug/compass-options
A small Node module for parsing Compass's config.rb file into options for use in Node projects (especially Grunt/Gulp/etc…)
https://github.com/snugug/compass-options
Last synced: about 1 year ago
JSON representation
A small Node module for parsing Compass's config.rb file into options for use in Node projects (especially Grunt/Gulp/etc…)
- Host: GitHub
- URL: https://github.com/snugug/compass-options
- Owner: Snugug
- License: mit
- Created: 2014-04-08T15:04:31.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-04-08T20:27:13.000Z (about 12 years ago)
- Last Synced: 2025-03-05T09:03:31.445Z (over 1 year ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Compass-Options
===============
A small Node module for parsing Compass's config.rb file into options for use in Node projects (especially Grunt/Gulp/etc…)
## Installation
```
$ npm install compass-options --save-dev
```
## Usage
Configure your [Compass `config.rb`](http://compass-style.org/help/tutorials/configuration-reference/) file as normal. Currently reads in the following settings with the following defaults:
* `http_path` - `'.'`
* `css_dir` - `'css'`
* `sass_dir` - `'sass'`
* `images_dir` - `'images'`
* `javascripts_dir` - `'js'`
* `fonts_dir` - `'fonts'`
```js
//////////////////////////////
// Get directories from Compass settings
//////////////////////////////
var dirs = require('compass-options').dirs({
'config': './config.rb', // Points to config.rb relative to this file. Defaults to './config.rb'
'trailing': false // Whether or not to include a trailing slash for directories
});
//////////////////////////////
// Get full paths from Compass settings (http_path + directory)
//////////////////////////////
var paths = require('compass-options').paths({
'config': './config.rb', // Points to config.rb relative to this file. Defaults to './config.rb'
'trailing': false // Whether or not to include a trailing slash for paths
});
```