@abraham/pkg-ok 中文文档教程
pkg-ok
pkg-ok
在发布之前检查package.json
中定义的路径和脚本 ????
- Ensures paths defined in
main
,bin
,module
,types
,typings
,es2015
andbrowser
exist - Ensures
bin
scripts use cross-platform line endings
这是 typicode/pkg-ok 的现代化分支。
Usage
npm install @abraham/pkg-ok --save-dev
// package.json
{
"main": "oops_this_file_doesnt_exist.js",
"scripts": {
"prepublishOnly": "... && pkg-ok"
}
}
npm publish
# Error!
# Since main file doesn't exist, publish is blocked
Options
pkg-ok< /code> 可以配置为检查额外的
package.json
字段或 bin 文件
pkg-ok --field someField --bin script.sh
API
const pkgDirectory = __dirname
pkgOk(pkgDirectory, {
fields: ['someAdditonalField'],
bin: ['someAdditionalScript.sh']
})
License
MIT
pkg-ok
pkg-ok
checks paths and scripts defined inpackage.json
before you publish ????
- Ensures paths defined in
main
,bin
,module
,types
,typings
,es2015
andbrowser
exist - Ensures
bin
scripts use cross-platform line endings
This is a modernized fork of typicode/pkg-ok.
Usage
npm install @abraham/pkg-ok --save-dev
// package.json
{
"main": "oops_this_file_doesnt_exist.js",
"scripts": {
"prepublishOnly": "... && pkg-ok"
}
}
npm publish
# Error!
# Since main file doesn't exist, publish is blocked
Options
pkg-ok
can be configured to check additional package.json
fields or bin files
pkg-ok --field someField --bin script.sh
API
const pkgDirectory = __dirname
pkgOk(pkgDirectory, {
fields: ['someAdditonalField'],
bin: ['someAdditionalScript.sh']
})
License
MIT
更多
你可能也喜欢
- @1hive/tecommons-ui 中文文档教程
- @2o3t/process-manager 中文文档教程
- @36node/redux-form 中文文档教程
- @6footgeek/validate-whitespace-string 中文文档教程
- @7revor/smart-design-sdk 中文文档教程
- @a-soul/extractor-tiktok 中文文档教程
- @abcum/ember-location 中文文档教程
- @abovesky/vue-sku-form 中文文档教程
- @accessible/popover 中文文档教程
- @accubits/currency-converter 中文文档教程