Utility to include a codename for your application based on version.
Utility to include a codename for your application based on version (up-to v10.X.X-X).
This works great alongside version bump utility: grunt-bumpx for keeping your version numbers and names up-to-date with each build.
Included codenames and patchNames created with the help of the excellent codenamegenerator.com website.
This plugin requires Grunt
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-codename --save-dev
The project follows the SemVer guidelines for version numbers; specifically following:
N.B. The supplied codenames and patchNames only include suport for single-digit numbers used for minor and patch of the version field (and major up to 10) - you must supply your own custom codenames and patchNames if you can't handle this restriction (but that's a lot of names)!
In your project's Gruntfile, add a section named
codename to the data object passed into
codename allows to set the codename and patchName based on the version number of the configuration files (package.json, manifest.json, etc.) in your project. Only JSON files are supported, and each file must have a
version field compliant to SemVer guidelines; specifically following:
Remember: The supplied codenames and patchNames only include suport for single-digit numbers used for minor and patch of the version field (and major up to 10) - you must supply your own custom codenames and patchNames if you can't handle this restriction (but that's a lot of names)!
codename is designed to update your package.json, manifest.json or any other JSON file with a "version" field (configured as noted above).
An example of a manifest.json file is below:
Once codename has been used (with patchNames enabled); the manifest.json file would be updated automatically as follows:
||Generate a name for the patch version as well as the main codename.|
||Use custom JSON for the codenames (and patchNames as required).|
||Use a custom object for codenames.|
||Use a custom object for patchNames.|
Running the task in this way, the
codename field of each source file will be automatically changed to the correct codename for the build release.
Running the task in this way, the
patchName fields of each traget file will be changed to the correct codename and patchName for the next minor release based on the names contained within the user-supplied codenames.json file.
Any contribution to improve the project and/or expand it is welcome.
If you're interested in contributing to this project, take care to maintain the existing coding style.
git checkout -b my-new-feature)
git commit -am 'Add some feature')
git push origin my-new-feature)
Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Changes, bug fixes and enhancements made to grunt-codename.
"Bronze Marklar" (Tayra)
"Bronze Marklar" (Pangolin)
"Bronze Marklar" (Ithomiid)
"Bronze Marklar" (Saiga)
"Perseus Amber" (Zokor)
"Perseus Amber" (Balbul)
"Perseus Amber" (Malbrouck)
"Perseus Amber" (Anoa)
0.8.9-0which in turn becomes
0.9.9-0which in turn becomes
For more information, please see the included GruntFile.js.
"Perseus Amber" (Uromastix)
"Perseus Amber" (Tayra)
"Perseus Amber" (Pangolin)
"Perseus Amber" (Ithomiid)
"Perseus Amber" (Saiga)
See the LICENSE distributed with the project.