A collection of generic utility scripts. Useful for various development and maintenance tasks.
Add the following entry into devDependencies
in target package.json
via:
yarn add --dev @mservicestech/scripts
All the scripts provide individual documentation entries available via the --help
flag:
./node_modules/@mservicestech/scripts/example/example.sh --help
The package provides common scripting utilities which help in writing customized workspace-specific tooling:
source ./node_modules/@mservicestech/scripts/utils.sh
If you want to add TypeScript util you need to create a new folder in src/<typeScriptUtilName>
directory with script file. Then you need to add this script to src/index.ts
file. After that you can use this util in your project.
utility | description |
---|---|
clean_exit | exits a given script, killing the whole process tree |
run_script | runs a CommonJS script using node |
transpile | transpile a TypeScript file using either 'esbuild' or 'tsc' |
token_set | sets a shell token in the current environment |
parse_arguments | parse shell script arguments into an associative array |
fix_exports | overrides getter class export in a file transpiled with esbuild |
In order to release the package use the following script:
yarn release
After the release succeeds, run the following to publish the package in GitHub registry:
yarn publish