init-pkg-json-cli

1.0.0 • Public • Published




init-editorconfig-cli : Cli generator of .editorconfig 🐭

Install

npm install init-gitignore-cli

Cli

Usage
    $ init-pkg-json <option>
 
Options
    --docs               Read online documentation
    -h, --help           Show this help message and close
    -v, --version        Show packge version
    -f, --feedback       Send a feedback
            --indentation    Set package.json indentaion
    -n, --name           Add name to packge.json: required *
            --pkg-version    Add version to packge.json: required *
    -d, --description    Add description to packge.json
    -k, --keywords       Add keywords to packge.json
    -l, --license        Add license to packge.json
    -r, --repository     Add repository url link to the packge.json
    -h, --home           Add homepage link to packge.json
    -b, --bugs           Add bugs link to packge.json
    -a, --author         Add author to packge.json
            --files          Add files to packge.json
    -m, --main           Add primary entry point file
            --bin            Executable files included with your project that will be installed
    -s, --scripts        For now, pass an object as script (pass an object)
            --dependencies   Add dependencies (pass an object)
            --dev-dep        Add dev dependencies (pass an object)
    -e, --engines        The engines specify versions of clients that must be used with your package
 
Example
    $ init-pkg-json -n "pkg-name" --pkg-version "1.0.0" -d "My amazing pkg"

Example

This is a big example 😅 : I'll be creating an interactive CLI for this module soon!

$ init-pkg-json -n "pkg-n" --pkg-version 1.0.3 -d "great-pkg" -k "pkg amazing" -l "MIT" -b https://github.com/u/r/issues -h https://yourpkg.org -r "https://gitub.com/u/p.git git" -a "Name email@d.com https://y.com" --files "filename.js dir/ glob/*.{js,json} test.js" --bin "command: bin/f.js, command1: index.js" -s "build-project: node build-project.js, test: test.js" --dependencies "pkg1: ^3.1.4" -e "node: >=4.4.7, yarn: ^0.14.0"

Result in package.json

{
  "name": "pkg-n",
  "version": "1.0.3",
  "description": "great-pkg",
  "keywords": [
    "pkg",
    "amazing"
  ],
  "license": "MIT",
  "homepage": "https://yourpkg.org",
  "bugs": "https://github.com/u/r/issues",
  "repository": {
    "type": "git",
    "url": "https://gitub.com/u/p.git"
  },
  "author": {
    "name": "name",
    "email": "email@d.com",
    "url": "https://y.com"
  },
  "files": [
    "filename.js",
    "dir/",
    "glob/*.{js,json}",
    "test.js"
  ],
  "bin": {
    "command": "bin/f.js",
    "command1": "index.js"
  },
  "scripts": {
    "build-project": "nodebuild-project.js",
    "test": "test.js"
  },
  "dependencies": {
    "pkg1": "^3.1.4"
  },
  "engines": {
    "node": ">=4.4.7",
    "yarn": "^0.14.0"
  }
}

Related

Team

Carlos Abraham Logo
Carlos Abraham

License

MIT License © Carlos Abraham

 top ↑

Package Sidebar

Install

npm i init-pkg-json-cli

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

11 kB

Total Files

4

Last publish

Collaborators

  • abranhe