Skip to content
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

Blah 2.0.0 #19

Merged
merged 16 commits into from
Jun 23, 2015
Merged

Blah 2.0.0 #19

merged 16 commits into from
Jun 23, 2015

Conversation

IonicaBizau
Copy link
Owner

⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐

Blah 2.0.0

This little shiny tool just got better! In this new release I implemented a lot of new features.

First of all, the command line arguments are parsed using clp - this allows to automatically generate help content for blah --help (or blah -h):

$ blah -h
Usage: blah [options]

Options:
  -i, --init                    Inits the .blah directory.             
  -r, --readme                  Creates the README.md file.            
  -g, --gitignore               Creates the .gitignore file.           
  -l, --license <license>       Generates a LICENSE file with copyright
                                information.                           
  -c, --contributing            Generates the CONTRIBUTING.md.         
  -d, --docs <path>             Generates the markdown documentation   
                                (DOCUMENTATION.md) for input file.     
  -b, --bump-version <version>  Bumps the package.json version.        
  -h, --help                    Displays this help.                    
  -v, --version                 Displays version information.          

Examples:

  $ blah --readme      # generates the README.md file using package.json
  $ blah --gitignore   # generates the .gitignore file
  $ blah --license mit # generates the LICENSE file taking copyright holder information
                       # from package.json or GIT variables
  $ blah --docs index.js # generates DOCUMENTATION.md from index.js, parsing JSDoc comments
  $ blah --bump-version major # bumps the major field of version, in package.json file

Happy Blahing!

Documentation can be found at https://github.com/IonicaBizau/node-blah

So, after installing blah (npm i blah -g), everything starts with reading the help content. In this new release I introduced three levels of templates:

  • project templates
  • user templates
  • default templates

Project Templates

These are stored in the .blah directory of a project. They have the greatest priority when generating documentation. To init the .blah directory you have to run:

$ blah -i
# or
$ blah --init

This will create the .blah directory copying templates from ~/.blah-templates or default templates.

This level of templates is mainly designed for having project related notes in the readme file.

User Templates

They are stored in the ~/.blah-templates folder. If the project templates are missing, then blah tries to use the user templates. These are designed for automating the docs generating for projects.

Default templates

They are stored in the lib/templates folder of this very project. If user templates are missing, then these default templates will be used.

⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐ 🌟 ⭐

Generating docs

  • For readme files, you just need to run blah -r and let the magic happen. ✨
  • To generate .gitignore, do blah -g.
  • To generate the LICENSE file, do blah -l MIT (this will create a copy of the MIT license).
  • For CONTRIBUTING.md, run blah -c.
  • To generate DOCUMENTATION.md do blah -d lib/index.js (or any other input file)
  • To bump the project version, blah -b major (or any of the following: major, minor, patch)

This update involved a lot of work. The following packages were added/updated:

Before merging, @cbou should release the new version of markdox with some fixes:


I already started to use this new version in generating the documentation for the subdependencies and it works like a charm! πŸ’«


Fixes #10, #11, #12, #13, #14, #15, #16, #17, #18. πŸ’₯

@IonicaBizau IonicaBizau merged commit e97ecfa into master Jun 23, 2015
@IonicaBizau IonicaBizau deleted the new-version branch June 23, 2015 17:58
@IonicaBizau
Copy link
Owner Author

🚒 2.0.0 πŸŽ‰

I wrote a blog post about this release. Check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use barbe
1 participant