@unionco/node-scripts
v0.0.6
Published
Node.js scripts
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
scriptsfolder to the top level of a package. - Within
scriptsadd a file namedpublish.cjs
const { publishPackageToNpm } = require('@unionco/node-scrips')
publishPackageToNpm()- Within the
package.jsonadd a new line in thescriptskey
"scripts": {
"publish": "yarn scripts/public"
}To use publishing:
- Setup publishing shown above
- Make sure you're logged into git & npm
- Run
yarn publish
