Permalink
Browse files

using compiled_dir var for rollups. fixed missing usage of urls var i…

…n core
  • Loading branch information...
1 parent e1ba8cf commit bcb2a52a4669d71a504266ba701a752e4ddfe3a0 @twobit twobit committed May 8, 2012
Showing with 10 additions and 10 deletions.
  1. +2 −2 lib/core.js
  2. +7 −7 lib/shaker.js
  3. +1 −1 test/core/test1.js
View
@@ -1026,8 +1026,8 @@ ShakerCore.prototype._mojitResources = function (urls) {
resources.mojits[mojit] = {assets: {}, binders: {}, autoload: {}, models: {}, views: {}};
});
- for (url in this._store._staticURLs) {
- filename = this._store._staticURLs[url];
+ for (url in urls) {
+ filename = urls[url];
content_type = mime.lookup(filename);
type = content_type.split('/')[0];
View
@@ -333,7 +333,7 @@ Shaker.prototype = {
// Mojito core assets
queue.push({
- object: new Rollup(Shaker.COMPILED_DIR + 'core_{checksum}.js', metadata.core.slice() /* Clone */),
+ object: new Rollup(this._compiled_dir + 'core_{checksum}.js', metadata.core.slice() /* Clone */),
files: metadata.core
});
metadata.core.length = 0;
@@ -345,7 +345,7 @@ Shaker.prototype = {
client = metadata.mojits[mojit][action].client;
if (client.length) {
queue.push({
- object: new ClientRollup(Shaker.COMPILED_DIR + 'client_' + mojit + '_{checksum}.js', this._core.getAppRoot(), client.slice() /* Clone */),
+ object: new ClientRollup(this._compiled_dir + 'client_' + mojit + '_{checksum}.js', this._core.getAppRoot(), client.slice() /* Clone */),
files: client
});
client.length = 0;
@@ -358,13 +358,13 @@ Shaker.prototype = {
if (filtered.js.length) {
queue.push({
- object: new Rollup(Shaker.COMPILED_DIR + name + '.js', filtered.js),
+ object: new Rollup(this._compiled_dir + name + '.js', filtered.js),
files: files[dim]
});
}
if (filtered.css.length) {
queue.push({
- object: new Rollup(Shaker.COMPILED_DIR + name + '.css', filtered.css),
+ object: new Rollup(this._compiled_dir + name + '.css', filtered.css),
files: files[dim]
});
}
@@ -380,7 +380,7 @@ Shaker.prototype = {
client = metadata.app[action].client;
if (client.length) {
queue.push({
- object: new ClientRollup(Shaker.COMPILED_DIR + 'appclient_' + action + '_{checksum}.js', this._core.getAppRoot(), client.slice() /* Clone */ ),
+ object: new ClientRollup(this._compiled_dir + 'appclient_' + action + '_{checksum}.js', this._core.getAppRoot(), client.slice() /* Clone */ ),
files: client
});
client.length = 0;
@@ -393,13 +393,13 @@ Shaker.prototype = {
if (filtered.js.length) {
queue.push({
- object: new Rollup(Shaker.COMPILED_DIR + name + '.js', filtered.js),
+ object: new Rollup(this._compiled_dir + name + '.js', filtered.js),
files: files[dim]
});
}
if (filtered.css.length) {
queue.push({
- object: new Rollup(Shaker.COMPILED_DIR + name + '.css', filtered.css),
+ object: new Rollup(this._compiled_dir + name + '.css', filtered.css),
files: files[dim]
});
}
View
@@ -25,7 +25,7 @@ suite.add( new YUITest.TestCase({
store.preload(context);
this.shaker = new Shaker({store:store});
- this.shaker._resources = this.shaker._mojitResources();
+ this.shaker._resources = this.shaker._mojitResources(store._staticURLs);
this.defaultAction = '*';
this.defaultOrder = 'common-index-device-skin-region-lang';

0 comments on commit bcb2a52

Please sign in to comment.