kentcdodds/nps-utils
Fork: 23 Star: 101 (更新于 2024-11-18 16:36:11)
license: MIT
Language: JavaScript .
Utilities for http://npm.im/nps (npm-package-scripts)
最后发布版本: v1.7.0 ( 2018-08-13 01:31:57)
nps-utils
Utilities for nps (npm-package-scripts)
The problem
nps is a great package to empower your scripts and there are some common
things you wind up doing to keep your package-scripts.js
file clean, useful,
and maintainable. So you wind up duplicating utility functions across projects.
This solution
This has several utility functions you'll often want when using nps
.
Check out what the concurrent
and runInNewWindow
methods can do:
Installation
This module is distributed via npm which is bundled with node and
should be installed as one of your project's devDependencies
:
npm install --save-dev nps-utils
Usage
You'll most likely use this in your package-scripts.js
file:
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
validate: npsUtils.concurrent.nps('lint', 'build', 'test --coverage'),
lint: 'eslint .',
build: 'webpack --env.production',
test: 'jest'
}
}
Available methods:
API docs can be found here
- concurrent
- series
- runInNewWindow
- rimraf
- ifWindows
- ifNotWindows
- copy
- ncp
- mkdirp
- open
- crossEnv
- includePackage
nps
also exports common-tags
as commonTags
which can be
really helpful for long scripts or descriptions.
Or, see the JSDoc right in the source code 😎
Inspiration
This package was inspired by the removal of --parallel
from p-s
here.
Other Solutions
I am unaware of other solutions, but if you come across any, please add a PR to list them here!
Contributors
Thanks goes to these people (emoji key):
Kent C. Dodds 💻 📖 🚇 ⚠️ |
Huy Nguyen 📖 🚇 |
Keith Gunn 🐛 💻 📖 ⚠️ |
Mike Cann 💻 ⚠️ |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
LICENSE
MIT
最近版本更新:(数据更新于 2024-10-10 22:30:10)
2018-08-13 01:31:57 v1.7.0
2018-06-16 19:41:59 v1.6.0
2017-10-25 11:09:06 v1.5.0
2017-10-03 13:36:11 v1.4.0
2017-07-25 05:57:34 v1.3.0
2017-03-09 21:20:37 v1.2.0
2017-03-03 03:58:23 v1.1.2
2017-03-03 02:16:44 v1.1.1
2017-03-03 01:55:44 v1.1.0
2017-03-03 00:45:55 v1.0.2
主题(topics):
command-line, javascript, package-scripts, scripts, utilities
kentcdodds/nps-utils同语言 JavaScript最近更新仓库
2024-11-22 16:46:00 meshery/meshery
2024-11-21 23:03:24 bia-pain-bache/BPB-Worker-Panel
2024-11-21 22:46:48 MHSanaei/3x-ui
2024-11-21 07:00:59 nodejs/node
2024-11-21 00:49:46 FortAwesome/Font-Awesome
2024-11-18 14:26:02 projectdiscovery/nuclei-templates