An open API service indexing awesome lists of open source software.

https://github.com/zacanger/sortpack

Organize your package.json
https://github.com/zacanger/sortpack

cleanup fixpack organize package package-json sort

Last synced: 6 months ago
JSON representation

Organize your package.json

Awesome Lists containing this project

README

          

# sortpack

Organize your package.json

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

[Donate](https://ko-fi.com/zacanger)

--------

## 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](./LICENSE.md)