Skip to content

Instantly share code, notes, and snippets.

@BonsaiDen
Created March 6, 2015 16:58
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 BonsaiDen/cc27b240d834ba971372 to your computer and use it in GitHub Desktop.
Save BonsaiDen/cc27b240d834ba971372 to your computer and use it in GitHub Desktop.
Ideas for Substrat 2
// Disable compress and concat filters, this turns them into forwarders
sub.disable('compress').disabled('concat');
// filter takes but keeps, reduced takes and removes
var libs = sub.reduce(/lib\/.*\.js$/).compress().concat(),
config = sub.reduce('js/global.js').compile(sub.mustache()),
app = config.merge(sub.reduce([
/js\/core\/.*\.js$/,
/js\/controller\/.*\.js$/,
'js/app.js',
'js/app.routes.js',
'js/app.providers.js',
/js\/directives\/.*\.js$/
])).compress().concat(),
full = libs.merge(app).concat().write('app.js'),
style = sub.reduce([
/lib\/.*\.css$/,
/style\/.*\.css$/
]).compile(sub.less()).concat().write('style.css'),
templates = sub.reduce(/template\/.*\.jade/).compile(sub.jade()).filter('index.jade', function(index) {
return index.livereload();
}).write('*.html');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment