1.0.9 • Published 4 years ago

@nestagencyuk/typescript_lib-frontend v1.0.9

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

TypeScript Frontend Library

Latest release codecov

This repository contains Nest's frontend TypeScript library. This will hold any useful code snippets for re-use across all internal projects.

View


Contributing

If you wish to contribute to this repo directly, then continue reading the contribution instructions below.

Setup

Install all dependencies.

$ npm install

Develop

Bundles everything using webpack, starts the dev server and watches for changes.

$ npm run dev

Scaffold

You can quickly scaffold a new function by running:

$ NAME=MyNewFunction npm run scaffold

This will create a new function folder with all the required files and some example variants. This is the best way of ensuring a new function complies with our coding standards and naming conventions.

Build

Bundles everything using webpack.

$ npm run build

Testing

Run all tests:

$ npm run test

Run individual tests:

CommandDescription
$ npm run test:unitRun component unit tests
$ npm run test:coverageRun coverage tests and send coverage report

Release

To create a new release:

  1. First ensure that you're on the develop branch and all pull requests and branches have been pulled and merged in (incl. master as the version may have been bumped).
  2. Using Git Flow*, run git flow release start vX.X.X, replacing the X.X.X with the appropriate new version number, incremented by one. Follow semvar practices, e.g vX.0.0 denotes a major version, v0.X.0 is a minor version and v0.0.X is a patch. See the package.json for the most recent version number.
  3. Carry out any last minute work on the release branch and commit as normal.
  4. When finished, run git flow release finish vX.X.X and add any relevant commit messages. You must add a tag message otherwise the release will fail.
  5. The release branch should now be merged into both develop and master. Now you just need to run npm run deploy and you're done! The CI pipeline will handle the rest.

NOTE: Using Git Flow ensures the tagging is handled correctly. Creating a release branch manually won't work.