Skip to content

Commit

Permalink
[major] Remove the default css namespacing, introduce asyncemit and…
Browse files Browse the repository at this point in the history
… `assembly` event
  • Loading branch information
3rd-Eden committed Mar 30, 2015
1 parent 8b1aaee commit db8e7ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/compiler.js
Expand Up @@ -66,6 +66,7 @@ function Compiler(directory, pipe, options) {
}

Compiler.prototype.__proto__ = require('eventemitter3').prototype;
Compiler.prototype.asyncemit = require('asyncemit');

/**
* Create the BigPipe base front-end framework that's required for the handling
Expand Down Expand Up @@ -362,10 +363,10 @@ Compiler.prototype.catalog = function catalog(pages, done) {
*/
function register(assemble, next) {
async.each(Object.keys(assemble), function prefix(hash, fn) {
compiler.namespace(assemble[hash], function namespaced(error, file) {
if (error) return fn(error);
compiler.asyncemit('assembly', assemble[hash], function (err) {
if (err) return fn(err);

compiler.register(file);
compiler.register(assemble[hash]);
fn();
});
}, next);
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -15,6 +15,7 @@
"404-pagelet": "1.0.x",
"500-pagelet": "1.0.x",
"async": "0.9.x",
"asyncemit": "1.0.x",
"bigpipe.js": "0.9.x",
"bootstrap-pagelet": "1.0.x",
"browserify": "8.1.x",
Expand Down

0 comments on commit db8e7ab

Please sign in to comment.