New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@nabin02/test-package

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@nabin02/test-package

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. It can be used in Node.js and browser applications.

unpublished
latest
Source
npmnpm
Version
0.0.1-development
Version published
Maintainers
1
Created
Source

modern-npm-package

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.

Get Started

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

Testing

  • Install developer dependencies using the following command in your terminal npm i -D mocha @types/mocha chai @types/chai ts-node
  • Create a new file .mocharc.json in the root directory with the following contents:
    {
      "extension": ["ts"],
      "spec": "./**/*.spec.ts",
      "require": "ts-node/register"
    }
    
  • Create a tests folder
  • Create an index.spec.ts file in the tests folder
  • Write unit tests in the index.spec.ts file to test the code in index.ts
  • Add a "test" property in the package.json file and give it a value of "mocha"
  • Run npm test in your terminal from the root folder of the project

Keywords

npm

FAQs

Package last updated on 04 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts