Ember CLI Compass Compiler
raw JSON →Addon for Ember CLI that integrates the Compass CSS authoring framework via a Ruby-based compiler. Version 0.5.0 is the current stable release, but the project has been unmaintained since 2016. It requires Ruby and the compass gem to be installed on the system. Unlike broccoli-sass or other pure JavaScript solutions, this addon delegates compilation to the external compass command, providing full Compass library support. It automatically compiles .scss files in app/styles, with the main file expected to be app.scss (breaking change from earlier versions that required appname.scss). Supports custom import paths and compassOptions overrides via Brocfile. Known issues include missing support for modern Ember CLI versions, Ruby dependency overhead, and incompatibility with newer Node.js versions.
Common errors
error Cannot read property 'compassOptions' of undefined ↓
error Error: compass not found ↓
error TypeError: Cannot read property 'compassOptions' of undefined ↓
Warnings
breaking Main SCSS file must be named app.scss (v0.2.0 breaking change) ↓
gotcha Requires Ruby and compass gem to be installed globally ↓
deprecated Addon is unmaintained; does not work with Ember CLI > 2.x or Node > 6 ↓
gotcha Cannot read property 'compassOptions' of undefined ↓
gotcha Windows compatibility issues with Ruby/compass subprocess ↓
Install
npm install ember-cli-compass-compiler yarn add ember-cli-compass-compiler pnpm add ember-cli-compass-compiler Imports
- default (EmberApp options) wrong
var app = EmberApp.create({ compassOptions: ... })correctnew EmberApp({ compassOptions: { outputStyle: 'expanded' } }) - compass import in SCSS wrong
@import 'compass'correct@import "compass"; - importPath option wrong
compassOptions: { importPaths: [...] }correctcompassOptions: { importPath: ['bower_components/some-dir'] }
Quickstart
// Install the addon
// ember install ember-cli-compass-compiler
// In Brocfile.js (for Ember CLI < 2.x)
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
compassOptions: {
outputStyle: 'expanded',
require: ['sass-css-importer', 'susy']
}
});
// In app/styles/app.scss
@import "compass";
.round-rect-button {
@include border-radius(4px, 4px);
}
module.exports = app.toTree();