Skip to content
Aubrey Portwood edited this page Mar 24, 2017 · 1 revision

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.

@since NEXT

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.

Workflow Example

  1. Create a new plugin using yo plugin-wp and set the initial version, e.g. 1.0.0
  2. Run generators, which should create new things using @since 1.0.0
  3. Write new code using @since NEXT in your docblocks
  4. Before release or moving to a new version, run grunt version to replace all NEXT with 1.0.0
  5. Release your awesome 1.0.0 thing
  6. Bump the version in package.json to 1.1.0 to start development on the next release
  7. Run generators and new code will contain @since 1.1.0 automatically
  8. Write new code using @since NEXT
  9. Before release, again, run grunt version to replace NEXT with 1.1.0
  10. Release your awesome 1.1.0 thing
  11. ....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.

Clone this wiki locally