Skip to content

npm faq

Ben Elan edited this page Apr 29, 2025 · 1 revision

NPM intro

What is NPM?

NPM is a web development tool for installing a project's dependencies and running scripts for building, testing, starting dev server, etc.

how does it manage files and changes, how do users access it and interact with releases there?

When installing a pack

how does it differ from Github? How does NPM integrate with GitHub (and other tools?)

GitHub is used to host the source code for a development project, and uses Git behind the scenes for version tracking. NPM is used for hosting the build files that are produced from the source code. The build files are for consumers, and the source code is for the developers.

What teams in Esri rely on NPM for calcite updates?

The vast majority of Calcite consumers work on web projects, since we don't offer components for other platforms. Almost all web development projects use NPM; either through NodeJS or a Content Delivery Network (CDN) that's published via NPM deployments.

What are packages, and key components making up a package?

Packages are reusable bits of code that are published to NPM. Developers can install packages and use them as building blocks in their projects/applications. All packages need a package.json. For more info, see NPM's documentation.

Do you have to use terminal to interact with NPM? If so what commands would we need to know?

Terminal is required to run NPM commands. The most important command is npm install. A few other common commands are npm start, npm test, and npm run build.

Getting started in NPM

How does one create and publish a package on NPM?

The Calcite monorepo has automated publishing packages to NPM using release-please and lerna for prereleases. To publish a new package outside of the Calcite monorepo, follow NPM's documentation.

Could you walk us through pulling the latest version of calcite from NPM?

The Calcite consumer would run npm install @esri/calcite-ui-icons@latest to install the latest version. For more info, see the npm install documentation.

How can we handle versioning and updates effectively to avoid compatibility issues?

How do things differ using NPM for a Monorepo vs a regular repository

Resources and Next Steps

What resources (documentation, tutorials, courses) would you recommend for learning more about NPM?

Are there any recommended practices for staying up-to-date with changes or improvements in NPM?

A lot of teams (including Calcite) use tools like Renovate or Dependabot, which automatically create pull requests to update NPM packages.

Who do we contact for questions about NPM?

You can reach out to Ben directly, or ask questions in one of the Calcite Teams channels.

Clone this wiki locally