Skip to content

Instantly share code, notes, and snippets.

@rwjblue
Forked from wagenet/ember-cli-broccoli-compass.js
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwjblue/25df033f2a79ca0ad62c to your computer and use it in GitHub Desktop.
Save rwjblue/25df033f2a79ca0ad62c to your computer and use it in GitHub Desktop.
app.registry.add('css', {
toTree: function(tree, inputPath, outputPath, options) {
// broccoli-compass doesn't like leading slashes
if (inputPath[0] === '/') { inputPath = inputPath.slice(1); }
return compileCompass(tree, inputPath + '/app.scss', {
outputStyle: 'expanded',
require: 'sass-css-importer', // Allows us to import CSS files with @import("CSS:path")
sassDir: inputPath,
imagesDir: 'images',
//fontsDir: 'fonts',
cssDir: outputPath
});
}
});
@samselikoff
Copy link

Thanks so much for your help @rjackson! Having a hard time figuring this out.

I now get this error:

ENOENT, no such file or directory '~/campaign-designer/ember/tmp/static_compiler-tmp_dest_dir-2OPhamzf.tmp/assets/app.css'
Error: ENOENT, no such file or directory '~/campaign-designer/ember/tmp/static_compiler-tmp_dest_dir-2OPhamzf.tmp/assets/app.css'
  at Object.fs.lstatSync (fs.js:679:18)
  at Object.copyRecursivelySync (~/campaign-designer/ember/node_modules/ember-cli/node_modules/broccoli-file-mover/node_modules/broccoli-kitchen-sink-helpers/index.js:142:21)
  at CachingWriter.Mover._copyFile (~/campaign-designer/ember/node_modules/ember-cli/node_modules/broccoli-file-mover/index.js:28:11)
  at CachingWriter.Mover.updateCache (~/campaign-designer/ember/node_modules/ember-cli/node_modules/broccoli-file-mover/index.js:51:10)
  at ~/campaign-designer/ember/node_modules/ember-cli/node_modules/broccoli-file-mover/node_modules/broccoli-caching-writer/index.js:39:12
  at tryCatch (~/campaign-designer/ember/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:163:16)
  at invokeCallback (~/campaign-designer/ember/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:172:17)
  at publish (~/campaign-designer/ember/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:150:13)
  at flush (~/campaign-designer/ember/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/asap.js:51:9)
  at process._tickCallback (node.js:419:13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment