I'm attempting to replace broccoli-sass with broccoli-compass, in the Broccoli Ember Sample.
My app structure looks like:
app
public
styles
app.scss
Brocfile:
...
var compileSass = require('broccoli-compass')
...
var appNamespace = 'my-app-name';
function preprocess (tree) {
tree = filterTemplates(tree, {
extensions: ['hbs', 'handlebars'],
compileFunction: 'Ember.Handlebars.compile'
})
return tree
}
var app = 'app'
app = pickFiles(app, {
srcDir: '/',
destDir: appNamespace // move under app namespace
})
app = preprocess(app)
var styles = 'styles'
styles = pickFiles(styles, {
srcDir: '/',
destDir: appNamespace
})
styles = preprocess(styles)
var tests = 'tests'
tests = pickFiles(tests, {
srcDir: '/',
destDir: appNamespace + '/tests'
})
tests = preprocess(tests)
var vendor = 'vendor'
var sourceTrees = [app, styles, vendor]
if (env !== 'production') {
sourceTrees.push(tests)
}
sourceTrees = sourceTrees.concat(findBowerTrees())
var appAndDependencies = new mergeTrees(sourceTrees, { overwrite: true })
var appJs = compileES6(appAndDependencies, {
loaderFile: 'loader.js',
ignoredModules: [
'ember/resolver'
],
inputFiles: [
appNamespace + '/**/*.js'
],
legacyFilesToAppend: [
'jquery.js',
'handlebars.js',
'ember.js',
'ember-resolver.js'
],
wrapInEval: false,
outputFile: '/assets/app.js'
})
var appCss = compileSass(appAndDependencies, 'styles/app.scss')
var publicFiles = 'public'
module.exports = mergeTrees([appJs, appCss, publicFiles])
However, I'm getting the following error when calling broccoli serve
:
[broccoli-compass] Error: No such file or directory - /Users/my.name/Documents/Code/broccoli-ember/tmp/tree_merger-tmp_dest_dir-4rW9S0CD.tmp/styles/app.scss
Any idea what I'm missing here?
I changed the brocfile styles preprocess to:
and the compileSass call to:
Similar to the answer here - Compiling Compass in an Ember-CLI project