Permalink
Browse files

fixed pr4

  • Loading branch information...
1 parent c06315f commit 00b17cb30903f6e9fec17f91e24ee90af23cdc9a @diervo diervo committed Nov 2, 2012
Showing with 14 additions and 2 deletions.
  1. +13 −1 addons/ac/shaker.server.js
  2. +1 −1 package.json
View
@@ -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.
View
@@ -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": [

0 comments on commit 00b17cb

Please sign in to comment.