-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making create.js more extensible #92
base: master
Are you sure you want to change the base?
Conversation
It looks as though you have tabs set for 2 spaces instead of 4? This makes the diff a bit difficult to decipher. Could you update this PR to preserve the 4-space tabs? Tip: Executing |
OK Derek, I am going to update that PR right now, the problem was JSlint tool. |
}; | ||
|
||
|
||
util.mix(exports, mods); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an EOF newline
mods = { | ||
|
||
/** | ||
Create a JSON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a bit more descriptive. Perhaps "Creates the JSON assets for the new module"?
Looks good to me. I don't see any harm in exposing |
OK Dereks, thanks, now we can reuse that code in other places. |
I had a quick chat with @darielnoel, he will make few more format changes before we merge this. |
All format problems have been fixed. |
+1 |
I am using Yogi sub commands for adding some features that I need for example, I need to generate an app skeleton from some configuration file. I have looked at create.js in yogi/lib/, in this file, I have found some functions like
createJSON(), and createDirs() which I would like to use in my custom sub command. The problem is that I can not access to these functions from my custom sub command.
I make YogiCreate = require(path.join(YOGI_PATH, 'lib/create')), but YogiCreate only contain the init() function. That is because create.js only export the init() function.
We could fix that in create.js, if we could export the createJSON() and createDirs() function.
I think that could be good, for adding more Yogi extensibility and reusability.
Best Regards Dariel