Blog

How to init node.js package without any confirmation promt?

Sometimes I need to initialise a node.js package inside an empty folder without needing to confirm all the defaults. So, I use –force (-f) option.

npm init --force

The default JSON that will be used, it will show as output too:

{
  "name": "ac-bundle-module-utils-proxy",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

Leave a Reply

Your email address will not be published. Required fields are marked *