Menu

Getting started

Install the project, then run it once to see it work. The steps below take a few minutes on a new machine.

Install

The package needs Node 24 or later. Check the version with node --version first.

Add the package to the project as a development dependency, so it stays out of the production install.

With npm

Run npm install --save-dev @example/core in the project folder. npm writes the version to the lockfile.

Commit the lockfile with the change, so every machine installs the same version.

Usage

Import greet from the package and call it with a name. It returns the greeting as a string.

Pass a second argument to change the greeting, such as "Good morning" in place of "hello".

Call it as often as needed: it keeps no state between calls.