ngx-cms-common-app

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.

Usage no npm install needed!

<script type="module">
  import ngxCmsCommonApp from 'https://cdn.skypack.dev/ngx-cms-common-app';
</script>

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

  1. Checkout a feature branch from develop and make your changes

  2. Open a PR to merge your feature branch into develop.

  3. 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).

  4. 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

  5. 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

  6. Once a beta release is ready to become a full version, open a PR to merge release into master.

  7. 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

  1. 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, for release/3.2.0 branch, the version should read 3.2.0-beta.0.

  2. Once the version is update you can publish the beta version using:

    1. cd /dist/ngx-cms-common
    2. npm publish --tag beta
  3. 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 be 3.2.0-beta.1.

How to publish a version

  1. In the master branch update projects/ngx-cms-common/package.json version with the appropriate version. For example 3.2.0-beta.0 would be updated to 3.2.0.

  2. Once the version is update you can publish version using:

    1. cd /dist/ngx-cms-common
    2. npm publish