zacanger / sortpack

Organize your package.json

Home Page:http://npm.im/sortpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sortpack

Organize your package.json

It's like Prettier for your package.json. Inspired by fixpack, but actively maintained!

Donate


Installation

npm i -D sortpack

Usage

sortpack

Add to your package.json:

"scripts": {
  "something": "sortpack"
}

Options:

-i [--indent] # either the string 'tab', or any number

Use with husky and lint-staged for automated goodness:

npm i -D husky sortpack lint-staged

// add to package.json:
  "lint-staged": {
    "package.json": [
      "sortpack"
    ]
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },

LICENSE

About

Organize your package.json

http://npm.im/sortpack

License:MIT License


Languages

Language:JavaScript 100.0%