-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
update/convert docs (templates) to use verb #501
Comments
When I try to convert docs to use verb in handlebars-helpers repo, I got error like below with Running "verb:readme" (verb) task
Warning: grunt is not defined Use --force to continue.
Aborted due to warnings. |
Have you tried running it without adding the new grunt-verb task? Also, if you forked the repo and pushed your changes up to a branch on your repo, we can pull that down to take a closer look. Thanks for helping out. |
@makotot the handlebars-helpers repo has a few things that make it more difficult to convert than others. I can take a look if you need help still |
@doowb @jonschlinkert Running "verb:readme" (verb) task
grunt-verb [nomatch] · verb could not find a match for {%= include("CHANGELOG") %}
Warning: ENOENT, no such file or directory 'undefined' Use --force to continue.
Aborted due to warnings. When remove Running "verb:readme" (verb) task
Warning: Unable to write "/Users/makototateno/dev/handlebars-helpers/README.md/.verbrc.md" file (Error code: ENOTDIR). Use --force to continue.
Aborted due to warnings. |
great, I'll take a look! thanks! |
@makotot I sent a PR to your repo: makotot/handlebars-helpers#1 |
@jonschlinkert |
👍 merged! |
Hmm, if Running "verb:readme" (verb) task
Warning: travis is not defined Use --force to continue.
Aborted due to warnings. Any suggestions? |
in the readme template, try removing the if statement that refers to travis, e.g. we now use |
@jonschlinkert |
This looks like a good exercise. I'll pick up assemble-contrib-sitemap, unless someone else is on it. |
👍 I'm really excited that you're all helping out! it's a great chance for me to get feedback too! so let me know what doesn't make sense, or how we can improve things so that verb/assemble are easier for newcomers to learn. fwiw, I should put a video together for verb, it's a more powerful and interesting project than it might seem at first. in the next version, when most of the core modules get split into separate repos I think it will start to make more sense what verb is capable of doing. |
@Melindrea, btw with assemble-contrib-sitemap you will probably need to remove the travis template as well (mentioned here: #501 (comment)) |
@jonschlinkert |
Yes, I retired the repo! sorry, I'll remove it from the list |
done! thank you @makotot and everyone who helped with this! Next, we're going to start refactoring the actual boilerplates to use assemble v0.5.0 if you're interested! |
Before we release Assemble v0.5.0, we'll need to:
This doesn't involve any actual documentation whatsoever, just updating templates/syntax (feel free to edit docs too, but it's not at all expected).
Which repos need this?
We should start with plugins and boilerplates (some of these might be done, I'll update the checkboxes as they are confirmed):
PluginsBoilerplates
A couple of suggestions
Once you get the hang of a few basic concepts with verb each repo should take about 5 minutes . But... you'll likely run into a few errors during the conversion since the syntax for most of the old templates are not compatible with verb. When this happens I'll most likely know exactly what's causing the issue so please don't go crazy trying to figure out what's wrong, just make a comment here with the error if you want help debugging.
Getting started
You'll need to be able to run verb to build the docs as you update them, so before anything else, do:
Now, onto upgrading/adding the docs templates!
Starting from scratch
Here is it in a nutshell:
If a repo doesn't use grunt-readme or verb/grunt-verb, then after git cloning the repo, run:
Don't run
verb
quite yet, but when you're ready to build the docs/readme for the repo, verb-cli will find this file and use it to build the README.md file (might sound crazy, but this file can be both a runtime config file and a markdown template, hence therc.md
).This is the content of
.verbrc.md
when it's added by the generator:Next, the content of the old readme into
.verbrc.md
. beneath theinstallation
section, and just upgrade the header/footer as shown in the images.Upgrade the docs templates
1. add verb/grunt-verb as a dep
To add grunt-verb or verb
devDependency
already, do2. add a .verbrc.md file
If The project doesn't have a docs directory with markdown templates
In the root of the project, if there is not already a file named
.verbrc.md
, then runyo verb:readme
to add one.Next, if there is a
docs
directory with aREADME.tmpl.md
template, copy the contents of that file to.verbrc.md
then delete the old readme template - but don't delete other files from the docs repo yet.3. convert templates
Prior to verb we used grunt-readme, so if the project used grunt-readme and hasn't been upgraded to verb yet, then the templates/docs probably have the old template syntax, which looks like this:
The new looks like this:
Here is a list of templates that need to be upgraded.
Related repos
You might get an error that says
Warning: "repos" is not defined
. This means the JSON file for related repos is missing. This is super easy to add.Install repos with npm:
npm i -g repos
. Now, to get a list of all assemble repos, you would runrepos assemble
. But we need to filter this and save them to a specific file.For plugins run:
For boilerplates run:
Verb info
The text was updated successfully, but these errors were encountered: