re-enable yaml support #907

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

drewfish commented Jan 11, 2013

closes #804

+ * @method preloadInitial
+ * @return {nothing}
+ */
+ preloadInitial: function() {
@caridy

caridy Jan 11, 2013

Collaborator

What happen if preloadInitial and then preload is called? Will be good if we support that use-case, so we can do some stuff before getting to the .preload() execution.

@drewfish

drewfish Jan 11, 2013

Contributor

Yeah, I had thought of that too. I will implement.

@@ -373,11 +387,14 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
*/
preload: function() {
// We need to do an initial sweep to find the resource store addons.
- this.preloadResourceVersions();
+ this.preloadInitial();
@caridy

caridy Jan 11, 2013

Collaborator

related to the comment above.

+ });
+ appConfig = store.getAppConfig();
+
+ pack = store.config.readConfigJSON(path.join(root, 'package.json'));
options.port = params[0] || appConfig.appPort || process.env.PORT || 8666;
@caridy

caridy Jan 11, 2013

Collaborator

Finally, different port per different context :) nice

@@ -79,7 +83,14 @@ Store.createStore = function(options) {
appConfig: options.appConfig
});
- store.preload();
+ switch (options.preload) {
@caridy

caridy Jan 11, 2013

Collaborator

isn't switch one of the bad parts in javascript? A couple of "if" statements should be just enough considering that the value was already validated/preset.

@caridy

caridy Jan 11, 2013

Collaborator

Travis failure:

458+ /home/travis/builds/yahoo/mojito/bin/mojito jslint -p
459store.js
460   1 87,9: Expected 'case' at column 5, not column 9.
461     case 'skip': break;
462   2 87,22: Expected 'break' at column 9, not column 22.
463     case 'skip': break;
464   3 88,9: Expected 'case' at column 5, not column 9.
465     case 'initial':
466   4 89,13: Expected 'store' at column 9, not column 13.
467     store.preloadInitial();
468   5 90,13: Expected 'break' at column 9, not column 13.
469     break;
470   6 91,9: Expected 'default' at column 5, not column 9.
471     default:
472   7 92,13: Expected 'store' at column 9, not column 13.
473     store.preload();
474app/commands/start.js
475   1 76,1: Unexpected '(space)'.
@drewfish

drewfish Jan 11, 2013

Contributor

I had no idea switch was contraindicated. The errors are because I forgot to run jslint, which I'll do.

Collaborator

caridy commented Jan 11, 2013

Closing this in favor of issue #916 which addressed the comments here and more to accomodate this commit for the multi-part application config files as well.

@caridy caridy closed this Jan 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment