
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
@gowravshekar/nps-utils
Advanced tools
Utilities for nps (npm-package-scripts)
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 has several utility functions you'll often want when using nps
.
This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's dependencies
:
npm install nps-utils
You'll most likely use this in your package-scripts.js
file:
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
validate: npsUtils.concurrentNPS('lint', 'build', 'test --coverage'),
lint: 'eslint .',
build: 'webpack --env.production',
test: 'jest'
}
}
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
validate: npsUtils.series('nps build', 'nps lint', 'nps test'),
lint: 'eslint .',
build: 'webpack --env.production',
test: 'jest'
}
}
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
clean: npsUtils.rimraf('build'),
}
}
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
copy: npsUtils.copy('dist', 'build'),
}
}
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
copy: npsUtils.crossEnv('NODE_ENV=production nps build'),
build: 'webpack --env.production'
}
}
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
copy: npsUtils.isDocker() ? 'nps watchInsideDocker' : 'nps watch',
watchInsideDocker: 'webpack --env.production',
watch: 'webpack --env.production'
}
}
const npsUtils = require('nps-utils')
module.exports = {
scripts: {
validate: npsUtils.concurrentNPS('build', 'lint', 'test'),
lint: 'eslint .',
build: 'webpack --env.production',
test: 'jest'
}
}
MIT
FAQs
Utilities for nps (npm-package-scripts)
We found that @gowravshekar/nps-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.