12.1.1 • Published 7 months ago
@pob/pretty-pkg v12.1.1
Install
npm install --save @pob/pretty-pkgUsage
Bin
directly
yarn pretty-pkg package.jsonwith lint-staged
{
"lint-staged": {
"package.json": ["pretty-pkg"]
}
}Lib
overrideSync
const { overrideSync } = require('@pob/pretty-pkg');
overrideSync('package.json');writeSync
const fs = require('fs');
const { writeSync } = require('@pob/pretty-pkg');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
writeSync(pkg, 'package.json');default
const fs = require('fs');
const prettyPkg = require('@pob/pretty-pkg');
// parsing yourself
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
fs.writeFileSync(prettyPkg(pkg), 'package.json');
// let prettyPkg parse
const pkgContent = fs.readFileSync('package.json', 'utf-8');
fs.writeFileSync(prettyPkg(pkgContent), 'package.json');10.0.0
1 year ago
12.0.0
10 months ago
12.1.0
7 months ago
12.0.1
9 months ago
12.1.1
7 months ago
12.0.2
9 months ago
11.0.0
12 months ago
8.1.0
1 year ago
8.0.0
1 year ago
9.0.0
1 year ago
7.1.1
2 years ago
7.1.0
2 years ago
7.0.0
2 years ago
6.3.0
2 years ago
6.1.0
2 years ago
6.1.2
2 years ago
6.2.0
2 years ago
6.1.1
2 years ago
6.0.0
2 years ago
5.1.2
3 years ago
5.1.1
3 years ago
5.1.0
3 years ago
5.0.0
3 years ago
4.3.0
3 years ago
4.1.0
4 years ago
4.2.0
4 years ago
3.2.0
4 years ago
4.0.1
4 years ago
4.0.0
4 years ago
3.1.2
4 years ago
3.1.1
4 years ago
3.1.0
4 years ago
3.0.0
4 years ago
3.0.0-alpha.0
4 years ago
2.1.0
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.0
6 years ago