Include example run command from node#136
Open
dominicbosch wants to merge 1 commit intonevir:masterfrom
Open
Conversation
I love the tool, it helps me in a great way to do my stuff! But I want to run it from node and not the terminal. I have groc in my package.json dependencies which makes it instantly available and runnable for everybody in the project scope. I had quite a hassle to find the exact syntax on how to do this with certain options. It was easy when the options were only the files to be used for the documentation, but as soon as I wanted to switch to a different output folder, it got a bit difficult to figure that out. I also tried it with the .groc.json config file, but that wasn't possible when calling groc.CLI(...). I still have the feeling I might use the wrong entry point (groc.CLI(...)) for my approach...?
Collaborator
|
Interesting. I came up with a completely different method when we were integrating groc into our documentation server. Here's a simplified version of what we did: var groc = require('groc');
var project = new groc.Project('/web/myProject', 'docs');
project.options.requireWhitespaceAfterToken = true;
project.index = 'INDEX.md';
project.files = ['file1.js', 'file2.js', 'INDEX.md'];
project.generate({ style: groc.styles.Gilt }, function (err) {}); |
Author
|
looks nice and easy for my task. But through CLI you'd have more options if required. |
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 love the tool, it helps me in a great way to do my stuff!
But I want to run it from node and not the terminal. I have groc in my package.json dependencies which makes it instantly available and runnable for everybody in the project scope.
I had quite a hassle to find the exact syntax on how to do this with certain options.
It was easy when the options were only the files to be used for the documentation, but as soon as I wanted to switch to a different output folder, it got a bit difficult to figure that out.
I also tried it with the .groc.json config file, but that wasn't possible when calling groc.CLI(...).
I still have the feeling I might use the wrong entry point (groc.CLI(...)) for my approach...?