@tfehotels/tfe-gatsby-library
v1.0.54
Published
Shared functions and utilities for TFE's Gatsby websites.
Downloads
963
Readme
TFE Gatsby Library
A NPM package containing shared functions and utilities for TFE's Gatsby websites.
Requirements
- Node v18.15.0
- Yarn v1.22.19
Develop
You can see the changes of this library on real time by liking this package into your Gatsby app:
- Run
yarn link
at the root directory of this package. - Run
yarn link "@tfehotels/tfe-gatsby-library"
within your gatsby project.
Whenever the package is updated it needs to be built by running:
yarn build
The updated package will be compressed and placed within ./lib/
folder.
Configure NPM for publishing
We need to configure NPM for publishing packages using the tfehotels_developer
user.
- Install npmrc:
npm install -g npmrc
- Edit the
~/.npmrc
file, you will see something like this://registry.npmjs.org/:_authToken=npm_J9UyxrTFRVlWTBr7zKYeK584ZocxPS0SugsH
- Create the new profile "tfe" by running:
npmrc -c tfe
- Run
npm login
with username:tfehotels_developer
and password (stored in "1Password") - Create the new authentication token:
npm token create
Publish new version of the package
Any time the package is updated we need to publish the new version on NPM:
- Run
npmrc tfe
to use TFE's profile created on previous step. - Run
npm publish
to publish the package