@unionco/node-scripts
v0.0.6
Published
Node.js scripts
Downloads
1
Keywords
Readme
Node scripts package
Node scripts for use in other packages.
You can include this tool into other packages by adding this to the package.json, under dev dependencies.
"@unionco/node-scripts": "workspaces:^"
Building the package
This package is built using tsc. The script command is yarn build
.
This package will also be built by running the global yarn packages:build
Functions
publishPackageToNpm
Attempts to publish a package to npm.
To set up publishing:
- Include this package into the dev dependencies of that package.
- Add a
scripts
folder to the top level of a package. - Within
scripts
add a file namedpublish.cjs
const { publishPackageToNpm } = require('@unionco/node-scrips')
publishPackageToNpm()
- Within the
package.json
add a new line in thescripts
key
"scripts": {
"publish": "yarn scripts/public"
}
To use publishing:
- Setup publishing shown above
- Make sure you're logged into git & npm
- Run
yarn publish