grunt-release-notes-to-readme v0.1.0
grunt-release-notes-to-readme
A grunt plugin that will parse release notes from a JSON file into a readme.md file.
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-release-notes-to-readme --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-release-notes-to-readme');
The "release_notes_to_readme" task
Overview
In your project's Gruntfile, add a section named convertNotes
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
convertNotes: {
my_release_notes: {
options: {
package_json: 'package.json'
},
files: {
'README.md' : 'release-notes-valid-json.json'
}
}
}
});
Your release notes should be in a json file, formatted like this:
{
"1.1.0":{
"release_description" : "Version 1.1 of Release Notes has some new features.",
"release_date" : "2017-09-01 00:00:00",
"release_notes" :[
{
"note_title" : "All da features",
"note_description" : null,
"note_bullets" :[
"<mark>Mark it up!</mark>"
]
}
]
},
"1.0.0":{
"release_description" : "Version 1.0 of Release Notes is a major release that includes a fun new way to view release notes for themes.",
"release_date" : "2017-08-01 00:00:00",
"release_notes" :[
{
"note_title" : "Initial commit",
"note_description" : "You can optionally include descriptions. Otherwise, omit it or make its value <code>null</code>",
"note_bullets" :[
"Supports <b>text</b> <i>styles</i>",
"And other stuff"
]
},
{
"note_title" : "More features!",
"note_description" : null,
"note_bullets" :[
"Do what ya want"
]
}
]
}
}
Options
options.package_json
Type: String
Default value: package.json
The path to your package.json file. If none is selected, it will assume the package.json file in your project directory.
Release History
- 2017-09-13 v0.1.0 Initial release
7 years ago