Monorepo with Gatsby Kontent packages.
MIT License
Monorepo with Gatsby Kontent.ai packages.
The repository contains the development site (/site
) that could automatically load packages (packages
) thanks to npm workspaces.
Package | Summary | Version |
---|---|---|
Gatsby Source Kontent.ai Plugin | plugin providing data from Kontent.ai REST API to Gatsby GraphQL model | |
Gatsby Kontent.ai Components | package containing React components useful when processing Kontent.ai data to site |
Install packages
npm install # install all npm dependencies in the repository
Start watch mode packages
npm run watch # run watch mode through all packages source code
Run development site
npm run develop:site # run `gatsby develop` command in the development site
Now you are good to go. You could start browsing http://localhost:8000 for development site and http://localhost:8000/___graphql for GraphiQL explorer.
To run all tests, there is npm script prepared.
npm run test # run test script in all packages as well as in the development site
To build all of the packages as well as a development site, you could use one command.
npm run build # run build script in all packages as well as in the development site
To lint all of the packages as well as a development site, you could use one command.
npm run lint # run lint script in all packages as well as in the development site
As a publishing framework, there is a Lerna framework set up. This package is using Fixed/Locked mode. All minor and major changes should publish all packages, in case of patch version, it is up to developer decision.
If you have the rights to publish packages, just use lerna
and specify the version when prompted. All the changes made by lerna are automatically committed.
A typical scenario is when everything is ready and you want to publish the version, just use command.
npx lerna publish --tag-version-prefix=''
That should summarize the publish information and prompt you to define the version number and acknowledge the publish. Once everything is OK and you acknowledge the publish:
<YOUR VERSION>
is set to lerna.json
's version
<YOUR VERSION>
that could be used for creating GitHub release if you want💡 If you want to test out the beta version first (which is recommended) use following command and if everything is OK, release another patch version as the final version.
npx lerna publish --tag-version-prefix='' --dist-tag=beta