I figured out the solution. Or at least the workaround. Although it seems that the autoloader require the AssetsCompiler
it doesn't initialize it, the solution is to require the object and manually initialize it in the environment.js
module.exports = function (compound) {
'use strict';
var express = require('express');
var app = compound.app;
// require the assetsCompiler
var compiler = require('co-assets-compiler');
app.configure(function () {
// calling the init function will add the assetsCompiler object
// to the compound object and everything else should now work
// as expected
compiler.init(compound);
app.use(compound.assetsCompiler.add('scss', {
render: function (str, options, fn) {
@scss.render(str, ƒ (err, css) {
fn(err,css);
},{
includePaths: [app.root + '/app/assets/stylesheets/']
});
},
scss: require('node-sass'),
sourceExtension: 'scss',
destExtension: 'css'
}).init());
app.use(express.static(app.root + '/public', { maxAge: 86400000 }));
app.set('jsDirectory', '/javascripts/');
app.set('cssDirectory', '/stylesheets/');
app.set('cssEngine', 'scss');
app.use(express.bodyParser());
app.use(express.cookieParser('secret'));
app.use(express.session({secret: 'secret'}));
app.use(express.methodOverride());
app.use(app.router);
});
};