@cdab/utils v0.1.0
Introduction
Some handy utilities that could come in hand.
Develop instructions
1. Start working on a new feature
Make sure you have pulled the latest master
branch and installed all the dependencies.
git checkout -b feature/XXXXX
- Work in the
src
folder
2. Preparing build
Note: Try to only do one commit on each feature branch.
Build
Create a build before commiting your changes.
npm run build
This will save the build to the lib
folder.
Test the changes
You can now test the changes. How you would do this depends on what type of changes you are developing. One way would be to linking the local package to a project on your computer and use it.
https://docs.npmjs.com/cli/link.html
3. Commit changes
When you are ready to commit your changes, run the following command:
npm run commit
This will use Commitizen to create the commit.
If you want someone to review your changes, please create a pull request to the master
branch. Otherwise you can merge
your changes directly to master
locally.
git checkout master
git merge FEATURE/XXXXX
4. Creating a release
Preparations
npm run release
This will bump versions based on commit types, add commit descriptions to CHANGELOG.md, and create git tags according to the current version).
Push source code
Push changes and git tags to master branch using:
git push --follow-tags origin master
Now is the last moment to be able to review any changes before publishing the package.
Publish release
npm publish
This will publish the code to the NPM Artifact Feed in DevOps. The feed is defined in .npmrc
.
References
3 years ago