2.1.0 • Published 12 months ago
@voltiso/script v2.1.0
@voltiso/script
NPM scripts as code.
Use in YOUR project
pnpm add -D @voltiso/scriptDefine some scripts
Create scripts.ts files in your project directory, or any directory above it,
e.g.:
// scripts.ts
import { parallel } from '@voltiso/script'
export const build = 'tsc -b'
export const lintEslint = 'eslint .'
export const lintTsc = 'tsc --noEmit'
export const lint = parallel(lintEslint, lintTsc)
export const check = [build, lint] // sequential
export const custom = async () => {
console.log('custom script')
return 'pnpm publish' // optional return
}CLI Usage
pnpm exec v [command]...or - longer version:
pnpm exec voltiso-script [command]The script is searched for in this order:
package.jsonscriptsscripts.tsfile in the current directoryscripts.tsfile in the parent directory, and so on
Even if the script is found in a directory above, the cwd does NOT change.
This allows defining common scripts in a parent directory, instead of
duplicating them in every project.
2.0.9
12 months ago
2.0.10
12 months ago
2.1.0
12 months ago
2.0.7
3 years ago
2.0.8
3 years ago
1.3.2
3 years ago
2.0.3
3 years ago
2.0.2
3 years ago
2.0.5
3 years ago
2.0.4
3 years ago
2.0.6
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.2.0
3 years ago
1.1.1
3 years ago
1.0.2
3 years ago
1.1.0
3 years ago
1.0.1
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.3.0
3 years ago
1.1.2
3 years ago
1.0.0
3 years ago