Browse files

ShakerCore should not be visible outside.

ShakerCore should only be required within Shaker, and not in the
command.
  • Loading branch information...
1 parent 13d5955 commit c6b1be30b569ac660f25f67c9c6b1aba4157df65 @diervo diervo committed May 1, 2012
Showing with 5 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +1 −2 commands/shake.js
  3. +3 −2 lib/shaker.js
View
1 .gitignore
@@ -1,6 +1,7 @@
node_modules
docs/.build
examples/demo/node_modules
+examples/demovm
examples/demo/autoload
examples/demo/assets/compiled
View
3 commands/shake.js
@@ -20,7 +20,6 @@ try{
}
try {
Shaker = require('mojito-shaker').Shaker;
- ShakerCore = require('mojito-shaker/lib/core').ShakerCore;
}
catch (exception){
try{
@@ -101,7 +100,7 @@ exports.run = function(params, options, callback) {
var store = new ResourceStore(root);
store.preload(context);
- new Shaker(new ShakerCore({store: store})).run(function(metadata) {
+ new Shaker({store:store}).run(function(metadata) {
if(options.run){
delete options.run;
start.run(params,options,callback);
View
5 lib/shaker.js
@@ -162,8 +162,9 @@ ClientRollup.prototype = {
*
* @param core {Object} A Shaker core object for a Mojito app.
*/
-function Shaker(core) {
- this._core = core;
+function Shaker(options) {
+
+ this._core = options.core || new ShakerCore(options);
var shaker = this._core.getConfig();
this._task = shaker.task; // Task to run when compiling assets

0 comments on commit c6b1be3

Please sign in to comment.