This document describes how you can lint, test, build and publish this project.
Before you can start you must install and configure the following products on your development machine:
You will then need to clone this project and install the required dependencies:
git clone <repository_url> <dir_name>
cd <dir_name>
npm installCheck that the code is properly formatted and adheres to coding style.
npm run lintEnsure that each unit of the library performs as expected.
npm run testYou 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
The library will be built in the ./dist directory.
npm run buildThis 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