Building and testing your code
In this recipe, we will create a simple Continuous Integration (CI) pipeline that builds and validates code and gets integrated into pull request validation. We’ll use this code in subsequent recipes – that’s why we’re using a very simple JavaScript package.
Getting ready
I think it is best to build a new repository and npm
package from scratch. Even if you’re not familiar with JavaScript, this should not be a challenge. You can compare your code or copy it from the following repository: https://github.com/wulfland/package-recipe. If you struggle with this, just clone this repository and work with it.
- Create a new public repository called
package-recipe
. Initialize it with a.gitignore
file and aREADME
file and pickNode
as the template for the.
gitignore
file. - Clone your repository locally or open it in Codespaces.
- Run the following command:
$ npm init
Follow the wizard. The name of the package...