DEV Community

Discussion on: Create/ Publish your first NPM package

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

Hint: IF you dont need details (or you use defaults) try npm init -y - it will not ask you about anything.

Ie.

devto|⇒ npm init -y
Wrote to /Users/pavel/projects/private/devto/package.json:

{
  "name": "devto",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "jsdom": "^16.2.2"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "Paweł Kowalski <pavelloz@gmail.com>",
  "license": "MIT"
}

Also,

sudo npm install -g ./ - I wouldnt recommend this. npm link was implemented to do this ;)

Collapse
 
deep1144 profile image
Deep

Yes definitely true i will add this points in post ❤