bevacqua/node-assetify — pull request #4 by faceleg (2013-08-03 14:26:58+00:00)
Title: Feature/pre compilation addition

I want to allow modules to add assets to assetify - I don't want to be required to declare all my assets in one big JSON blob.

This pull request allows one to do this:

```JavaScript
var assetify = require('assetify').instance();

// In the site somewhere
assetify.addFiles({
css: [{
file: '/stylesheets/style.css',
profile: 'core'
}, {
ext: '//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700',
profile: 'core'
}, {
file: '/stylesheets/font-awesome.css',
profile: 'core'
}],
js: [{
file: '/javascript/libraries/angular-1.1.5.js',
profile: 'core'
}]
});

// In a module that provides some authenticated area for example
assetify.addFiles({
js: [{
file: '/javascript/directives/ui-bootstrap-tpls-0.4.0.js',
profile: 'core-directives'
}, {
file: '/javascript/directives/ui-event.js',
profile: 'core-directives'
}]
});

// Compiling assetify
assetify.use(assetify.plugins.bundle);
assetify.compile({
assets: {
serve: false,
explicit: true,
source: path.join(rootDirectory, 'public'),
bin: path.join(rootDirectory, 'public')
}
}, function(error) {
callback(error, app, rootDirectory);
});
```