This project uses npm and Node.JS. Please use the Node.JS version specified in engines
in package.json
.
npm i
Use the following command to build latest library to /dist
on-the-fly:
npm start
This builds to /dist
and runs the project in watch mode so any edits you save inside src
causes a rebuild to /dist
.
To do a one-off build, use npm run build
.
Jest tests are set up to run with npm test
.
Use npm run lint
to perform lint.
Real integration tests are enabled if correct environment variables are provided.
Copy .env.sample
to .env
to get started.
If the environment variables are provided in .env
, running npm t
will also trigger an integration test, which will:
- Cleanup files with
PREFIX
inBUCKET
specified by.env
- Start a static file server that serves files under
test/fixtures
- Instantiate
MediaManager
that connects to GCS using credentials provided in.env
- Perform query & insertion on live Google Cloud Storage
- Run
npm version
and specify which version number to bump - Check version bump and push to
main
branch - Wait for build pass
- Create a release on Github using the version tag; it will trigger publication of the version on npm.
- If you forked
@cofacts/media-manager
to your account, please make sureNPM_TOKEN
secret exists in the Github action secret.
- If you forked