@oc-digital/data-snippets
v5.6.0
Published
A shared graphql snippets package
Downloads
1,124
Keywords
Readme
OC-Digital graphql snippets library
Local development usage
For use during early testing on your machine:
- In the downstream app run
npm install ../data-snippets
(use the path to this repo) - Start your downstream app in watch mode (for Partners this is just npm start)
- In here, run
npm run build
(you'll need to re-run this after making changes) - It will use the latest locally-built version in the downstream app
Note Don't commit the
package.json
change to github! It won't work on the code build system.
Beta usage
When you've tested it locally and its working, do a beta deploy as follows:
- check the package version in
package.json
and increment it according to semantic versioning (details below) - run
npm version 2.0.7-beta.0
using the incremented package version followed by-beta.0
for testing- increment it to
2.0.7-beta.1
for further beta tests
- increment it to
- run
npm publish --tag beta
to publish to npm (don't forget the--tag beta
!) - in the downstream app run
npm install @oc-digital/[email protected]
replacing with your version number
Publishing release
When a beta release is working as expected, follow these steps to do a live publish. This should only be done after a review approval.
- set the package version using
npm version x.y.z
replacing with the new version number (according to semantic versioning) - run
npm publish
to build and publish to npm
Versioning
This package uses semantic versioning.
To summarise the above link:
- The version is in the format MAJOR.MINOR.PATCH.
- If you make a breaking change (eg you remove a snippet or fields from a snippet), increment the MAJOR version.
- If you add a new snippet, increment the MINOR version.
- If you add fields to an existing snippet, increment the PATCH version.