-
Notifications
You must be signed in to change notification settings - Fork 64
Versioning
All you have to do is maintain your version in package.json
. Any new files created by generators will always follow what version is in package.json
. So, for instance if you want to work on a new release, all you need to do is ensure package.json
version has been bumped so any new files generated by the generator will contain the new version. You do this manually by editing the package.json
file.
The safest way to maintain your @since
tags is to always use @since NEXT
in new functions/functionality. You can always run grunt|gulp version
that will automatically replace @since NEXT
with the version in package.json
for you.
- Create a new plugin using
yo plugin-wp
and set the initial version, e.g.1.0.0
- Run generators, which should create new things using
@since 1.0.0
- Write new code using
@since NEXT
in your docblocks - Before release or moving to a new version, run
grunt version
to replace allNEXT
with1.0.0
- Release your awesome
1.0.0
thing - Bump the version in
package.json
to1.1.0
to start development on the next release - Run generators and new code will contain
@since 1.1.0
automatically - Write new code using
@since NEXT
- Before release, again, run
grunt version
to replaceNEXT
with1.1.0
- Release your awesome
1.1.0
thing - ....you get the idea.
Note that @since NEXT
is only an easy way for developers to not have to care about the version, as grunt version
can always set those to the right version, but you can always follow your @since
tags with what version is in package.json
.