Skip to content

Latest commit

History

History
76 lines (48 loc) 路 1.42 KB

DEVELOPER.md

File metadata and controls

76 lines (48 loc) 路 1.42 KB

Development

This document describes how you can test, build and publish the library.

Prerequisite

Before you can build and test this library you must install and configure the following products on your development machine:

You will then need to install the library required dependencies:

cd <library-path>
npm install

Testing locally

You can test the library while developing it, as follow:

  1. Create a test file

    // test.ts
    import latestVersion from './src/index';
    
    (async () => {
       console.log(await latestVersion('npm'));
    })();
  2. Run the test file with ts-node

    npx ts-node test.ts

Unit testing

Ensure that each unit of the library performs as expected.

npm run test

Linting/verifying source code

Check that the code is properly formatted and adheres to coding style.

npm run lint

Building the library

The library will be built in the ./dist directory.

npm run build

Publishing to NPM repository

This project comes with automatic continuous delivery (CD) using GitHub Actions.

  1. Bump the library version in ./package.json
  2. Push the changes
  3. Create a new: GitHub release
  4. Watch the results in: Actions