ngx-cms-common-app v1.2.1
ngx-cms-common
This library was built to develop and distribute common angular 2+ components. It also contains an example angular application that can be used to test existing and new components.
Structure
The repository follows the best practices defined by angular-cli. The root directory was generated using ng new ngx-cms-common-app
to scaffold out a basic angular application. Within the application directory, ng g library ngx-cms-common
was executed to generated the projects folder and supporting library configuration. All component development occurs in the project
directory. Anything outside of project
is strictly for the example application.
Installation
The library can be installed via npm with ngx-cms-common
.
Run Local Wiki
npm start
will start up a local wiki served at http://localhost:5555
Usage
cms
is the library prefix. This means that all component and directive names are by default generated with cms
at the beginning. Using the Dropdown
module as an example, cms-dropdown
is the component selector and cmsDropdown
is the the directive selector.
Release Workflow
Checkout a feature branch from develop and make your changes
Open a PR to merge your feature branch into develop.
Once develop has enough changes to warrant a release, a release branch should be created by branching off of develop. (NOTE: Coordinate with the rest of the team to create an appropriate branch).
Once a release branch becomes available, a beta version should be published to npm so that consumers can test the potential release. How to publish a beta version
For fixes/changes that need to be made to a potential release, you should branch off of the release branch and open a PR to merge back into it. Anytime changes are made to a release branch, a new beta version should be published. How to publish a beta version
Once a beta release is ready to become a full version, open a PR to merge release into master.
Once the release has been merged into master, you can publish a new version: How to publish a version
How to publish a beta version
- In the release branch update
projects/ngx-cms-common/package.json
version with the appropriate beta version. All beta versions should have-beta.X
appended to them. For example, forrelease/3.2.0
branch, the version should read3.2.0-beta.0
. Once the version is updated you can publish the beta version using:
npm run build:lib
cd /dist/ngx-cms-common
npm publish --tag beta
For subsequent beta releases, the final number in the version should be incremented. For example, the next beta version after
3.2.0-beta.0
would be3.2.0-beta.1
.
How to publish a version
- In the master branch update
projects/ngx-cms-common/package.json
version with the appropriate version. For example3.2.0-beta.0
would be updated to3.2.0
. Once the version is updated you can publish by:
- Create a Github Release. https://github.com/CMSgov/ngx-cms-common/releases (name should be "v" + the version number you are publishing. ex: v3.0.0)
- Add a description about what has changed and if there breaking changes, etc...
- Publish the release. (Github action will take care of the rest)
Want to Contribute?
Want to file a bug or contribute some code? Read up on our guidelines for contributing.
Public Domain
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
See the formal LICENSE file.