Skip to content

sanishchirayath1/modern-package-npm

Repository files navigation

modern-npm-package

Maintainability snyk Test Coverage npm (scoped) npm bundle size (scoped)

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format (CJS). It can be used in Node.js and browser applications.

Read the blog post for more information.

Get Started

  1. Run npm install in your terminal
  2. Then run npm run build
  3. Update the package.json file "name" field with your own package name. Example @username/package-name
  4. Create an account with npm if you don't have one already. Also be sure to enable two-factor authentication
  5. Sign in to your npm account in your terminal with npm login
  6. Run npm publish --access=public to publish your package