Skip to content

codeiaks/npm-module-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

npm-module-type

A simple tool to set the type to module in package.json files.

Installation

You can install npm-module-type globally to use it as a command-line tool:

npm install -g npm-module-type

Usage

Navigate to your Node.js project directory containing the package.json file and run the following command:

npm-module-type

This command will update the package.json file in the current directory, setting "type": "module".

Example

Assume you have a package.json file like this:

{
  "name": "my-node-project",
  "version": "1.0.0",
  "description": "A sample Node.js project",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "author": "Your Name",
  "license": "MIT"
}

to

{
  "name": "my-node-project",
  "version": "1.0.0",
  "description": "A sample Node.js project",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "author": "Your Name",
  "license": "MIT",
  "type": "module"
}

About

A tool to set the type to module in package.json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published