lets you can update package.json when publish
pnpm add pkgxo -D
{
"main": "index.ts",
"publishConfig": {
"main": "index.js"
},
"scripts": {
"prepublishOnly": "pkgxo --submit",
"postpublish": "pkgxo --reset"
}
}
pkgxo --submit
would update package.json, use pnpm-manifest by default.
package.json
is follow
{
"main": "index.js",
"publishConfig": {
"main": "index.js"
},
"scripts": {
"prepublishOnly": "pkgxo --submit",
"postpublish": "pkgxo --reset"
}
}
pkgxo --reset
would reset the latest package.json when submitted.
package.json
is follow
{
"main": "index.ts",
"publishConfig": {
"main": "index.js"
},
"scripts": {
"prepublishOnly": "pkgxo --submit",
"postpublish": "pkgxo --reset"
}
}
You could use pkgxo.js
in CWD for overwriting.
// pkgxo.js
const pnpmManifest = require('pkgxo/pnpm-manifest')
module.exports = async function (pkg, filename) {
pkg = await pnpmManifest(pkg, filename)
pkg.description = `[LOGO]: ${pkg.description || ''}`
return pkg
}
- Fork it!
- Create your new branch:
git checkout -b feature-new
orgit checkout -b fix-which-bug
- Start your magic work now
- Make sure npm test passes
- Commit your changes:
git commit -am 'feat: some description (close #123)'
orgit commit -am 'fix: some description (fix #123)'
- Push to the branch:
git push
- Submit a pull request :)
This library is written and maintained by imcuttle, moyuyc95@gmail.com.
MIT - imcuttle 🐟