https://github.com/gutenye/broccoli-compass-single
works out-of-box with ember-cli, also supports image sprites
https://github.com/gutenye/broccoli-compass-single
Last synced: 2 months ago
JSON representation
works out-of-box with ember-cli, also supports image sprites
- Host: GitHub
- URL: https://github.com/gutenye/broccoli-compass-single
- Owner: gutenye
- License: mit
- Created: 2014-06-29T00:39:35.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-29T01:22:09.000Z (almost 11 years ago)
- Last Synced: 2025-02-15T00:45:21.333Z (4 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# broccoli-compass-single
It works out-of-box with `ember-cli`
The broccoli-compass-single plugin compiles `.scss` and `.sass` files with [compass](https://github.com/Compass/compass).
## Get Started
### Options 1
Fork ember-cli, and change it:
```
# lib/preprocessors.jsmodule.exports.setupRegistry = function(app) {
...
registry.add('css', 'broccoli-compass-single', ['scss', 'sass']);# lib/broccoli/ember-app.js
EmberApp.prototype.styles = memoize(function() {
...
var processedStyles = preprocessCss(stylesAndVendor, '/app/styles', '/assets', {
importPath: ['vendor/foundation/scss'],
bundleExec: true,
imagesDir: 'public/images',
generatedImagesDir: 'dist/public'
});# package.json
dependencies: {
"broccoli-compass-single": "gutenye/broccoli-compass-single"
}```
### Option 2
Wait for ember-cli to be more mature, so that we don't need to directly modify the source code. Good news is ember-cli will introduce [custom options](https://github.com/stefanpenner/ember-cli/pull/1175#issuecomment-47300594) in the near feture.
### API
``` js
var outputTree = compileCompass(inputTrees, inputFile, outputFile, options);
```* **`inputTrees`**: An array of trees that act as the include paths for
compass. If you have a single tree, pass `[tree]`.* **`inputFile`**: Relative path of the main `.scss` or `.sass` file to compile. This
file must exist in one of the `inputTrees`.* **`outputFile`**: Relative path of the output CSS file.
* **`options`**: A hash of options for compass. Supported options are
`importPath`, `imagesDir`, `generatedImagesDir`, `bundleExec`, `outputStyle`## Install
``` bash
gem install compass# package.json
"devDependencies": {
"ember-cli": "your-fork/ember-cli"
}
```## License
[MIT](https://github.com/gutenye/broccoli-compass-single/blob/master/LICENSE.md)