Open jonschlinkert opened 10 years ago
I like this.
I think we could have scaffolds for common types of docs like grunt and gulp plugins (and other systems that are out there).
Are we able to inject text into an existing file? I'm thinking about a sub-generator that adds an options block to options.md
...
yo docs options foo
and it would add it at the end of the file. I think it should be possible.
:+1:
Detect what type of current project; grunt, gulp, yeoman, or general node and generate docs template base on choice.
Detect what type of current project; grunt, gulp, yeoman, or general node and generate docs template base on choice.
Great idea!
Are we able to inject text into an existing file?
It would be more reliable if we just generate a new document, foo.md
, then let the user add {%= include("foo.md") %}
where they want it to be inserted.
Also, I think the actual documents/templates should be in different node lib(s) so that we are maintaining the actual docs/templates separate from the generator logic. we can either group them into concepts, like "readme-templates", or we can keep all the docs in one separate repo, like "phaser-templates". it would probably be easier to maintain the latter. thoughts!
also, do you guys know of an existing generator, maybe from the yeoman core team, that we can use as a starting point for this? I think it's a little different than the generators we have.
Detect what type of current project; grunt, gulp, yeoman, or general node and generate docs template base on choice.
@hariadi I'm working on this generator now, I don't know the Yeoman API that well yet. Do you have suggestions for how I would copy a whole directory of files based on the user's choice? e.g. if the user chooses helper
as the boilerplate, it would copy over a few files specific to helpers, etc.
I have the rest of it done...
wait, I think I recall seeing something on the yeoman API for copying an entire directory, I can look for that
If you want interactive use, I think we can use https://github.com/yeoman/yo/ as a base.
$ yo docs
[?] What would you like to do?
Install a docs
Install assemble helpers
Install assemble plugins
Find some help
> Get me out of here!
:+1:
thanks!
@hariadi / @doowb just wanted to start some discussion on this generator. What would you want this generator to do?
Ideally I would love to have a generator that:
docs
directory for a project, including aREADME.tmpl.md
and related includesREADME.tmpl.md
template that is specialized for something specific. (What kinds of scaffolds would you like to see for docs? We can one for helpers, plugins, general node libs, etc)options.md
,getting-started.md
etc.What are your thoughts/ideas on this?