Registry / web-framework / ember-cli-compass-compiler

ember-cli-compass-compiler

JSON →
library0.5.0jsnpmunverified

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.

npm install ember-cli-compass-compiler
INSTALL
IMPORT
SIG · EMBER-CLI-COMPASS-
E
ember-cli-compass-compiler
web-frameworkjavascriptv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (EmberApp options)
new EmberApp({ compassOptions: { outputStyle: 'expanded' } })
var app = EmberApp.create({ compassOptions: ... })
compassOptions is passed to the EmberApp constructor as a property of the options object.
compass import in SCSS
@import "compass";
@import 'compass'
SCSS uses double quotes for imports.
importPath option
compassOptions: { importPath: ['bower_components/some-dir'] }
compassOptions: { importPaths: [...] }
The option is named importPath (singular).

Install the addon, configure compassOptions, and use Compass mixins in app.scss.

// 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();
Debug
Known issues
breakingMain SCSS file must be named app.scss (v0.2.0 breaking change)
fix
Rename your main SCSS file from <appname>.scss to app.scss.
affects: >=0.2.0
gotchaRequires Ruby and compass gem to be installed globally
fix
Run 'gem install compass' and ensure Ruby is available in PATH.
affects: all
deprecatedAddon is unmaintained; does not work with Ember CLI > 2.x or Node > 6
fix
Migrate to a pure JavaScript solution like ember-cli-sass or broccoli-sass.
affects: all
gotchaCannot read property 'compassOptions' of undefined
fix
Ensure addon's index.js defines an 'included' function that calls this._super.included(app).
affects: all
gotchaWindows compatibility issues with Ruby/compass subprocess
fix
Use a Unix-like environment or switch to a Node-based compiler.
affects: all
Errors
Common errors & fixes
Cannot read property 'compassOptions' of undefined
Addon's index.js missing included function or not calling super.
fix
Add 'included: function(app) { this._super.included(app); }' to index.js.
Error: compass not found
Ruby compass gem not installed or not in PATH.
fix
Run 'gem install compass' and verify with 'which compass'.
TypeError: Cannot read property 'compassOptions' of undefined
Same as above but from EmberApp constructor.
fix
Ensure compassOptions is passed to new EmberApp() only if needed, or check Ember CLI version.
Upgrade
Version history
0.5.0latest on npm
Audit
Dependencies
broccoli-compass-compilerrequiredCore compilation logic extracted into this broccoli plugin.
compass-compilerequiredLow-level binding to run the compass command.
Agent activity
2 hits · last 30 days
node
2
Resources
ember-cli-compass-compiler — npm install ember-cli-compass-compiler · libregistry