Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
fixed pr4
Browse files Browse the repository at this point in the history
  • Loading branch information
diervo committed Nov 2, 2012
1 parent c06315f commit 00b17cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion addons/ac/shaker.server.js
Expand Up @@ -28,20 +28,32 @@ YUI.add('mojito-shaker-addon', function(Y, NAME) {
var metaLoaded = this._initShaker();
this._deployClient = (ac.config && ac.config.get('deploy')) ||
(ac.instance.config && ac.instance.config.deploy === true);

//this._augmentAppAssets(ac);
if (metaLoaded) {
this._hookDeploy(ac, adapter);
} else {
Y.log('[SHAKER] Metadata not found. Application running without Shaker...','error');
}
},
_initShaker: function (){
var shakerMeta = YUI._mojito._cache && YUI._mojito._cache.shaker && YUI._mojito._cache.shaker.meta,
var shakerMeta = this._adapter.req.app.store.shaker.meta,
config = this._ac.app ? this._ac.app.config.shaker : this._ac.config.getAppConfig().shaker;
this._shakerConfig = config || {};
this._meta = shakerMeta || {};
return shakerMeta;
},
/*
* We add here the assets at the app level
*/
_augmentAppAssets: function (ac) {
var instance = ac.command.instance,
viewObj = instance.views[instance.action];
actionAssets = (viewObj && viewObj.assets) || {};
ac.assets.addAssets(actionAssets);
delete viewObj.assets;
},
/*
* We have to hook after the getSripts function gets executed (and the assets of the framework get merged)
* so we can remove/bypass the bottom calculated assets by mojito
* check _removeMojitoCalculatedAssets.
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "mojito-shaker",
"version": "2.0.34pr3",
"version": "2.0.35pr3",
"description": "Compiles and deploys asset rollups for Mojito applications.",
"author": "shaker-users@yahoo-inc.com <shaker-users@yahoo-inc.com>",
"contributors": [
Expand Down

0 comments on commit 00b17cb

Please sign in to comment.