EDS4 logo

Creating a new package

To scaffold a new package run the following command (replace my-package-name with your own package name):

npm run createpackage my-package-name

Once created, see the printout in the console for the next steps.

If you want to add a dependency to a package, you can add it by running npm install <dependency> in the package's directory.

NPM workspaces will be able to work out where and how to install the dependency.

For example: if you wanted to add the contentlayer package to the docs site:

  • Navigate to <reporoot>/docs
  • npm install contentlayer