Making create.js more extensible#92
Open
darielnoel wants to merge 12 commits into
Open
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 |
Author
|
OK Derek, I am going to update that PR right now, the problem was JSlint tool. |
There was a problem hiding this comment.
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 |
Author
|
OK Dereks, thanks, now we can reuse that code in other places. |
Member
|
I had a quick chat with @darielnoel, he will make few more format changes before we merge this. |
Author
|
All format problems have been fixed. |
Member
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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