README
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 update you can publish the beta version using:
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 update you can publish version using:
cd /dist/ngx-cms-common
npm publish