This document describes how you can test, build and publish the library.
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
You can test the library while developing it, as follow:
-
Create a test file
// test.ts import latestVersion from './src/index'; (async () => { console.log(await latestVersion('npm')); })();
-
Run the test file with ts-node
npx ts-node test.ts
Ensure that each unit of the library performs as expected.
npm run test
Check that the code is properly formatted and adheres to coding style.
npm run lint
The library will be built in the ./dist
directory.
npm run build
This project comes with automatic continuous delivery (CD) using GitHub Actions.
- Bump the library version in
./package.json
- Push the changes
- Create a new: GitHub release
- Watch the results in: Actions