2.1 KiB
2.1 KiB
Transmute - Common
Provides common types & utilities used throughout the Transmute stack.
Please check out the Transmute repository for more info.
Table of Contents
Prerequisites
Setup
NPM Install
This will install the prebuilt library from GitLab:
- Create a
.npmrc
file & add the GitLab's package registry URL':
@transmute:registry=https://gitlab.zakscode.com/api/v4/projects/85/packages/npm/
//gitlab.zakscode.com/api/v4/projects/85/packages/npm/:_authToken=tvNAnPtzjy59xFrHBJ2J
- Install as normal:
npm install --save @transmute/common
If you would like to use your local source code instead of the prebuilt library, continue to the NPM Link section.
NPM Link
Make sure you have completed the NPM Install section before continuing.
A local copy of common can be used to test changes using npm link. After cloning:
- Install the dependencies:
npm install
- Build or watch the common library:
npm run build
ornpm run watch
- link the library to npm from common's root directory:
npm link
- Link the library to a project:
cd ../project && npm link @transmute/common
Warning: Step 4 will need to be re-run when ever an npm install
is completed.
This will only work on your local machine. Make sure you have completed the NPM Install & @cwb/common
is part of package.json
.
Cheatsheet
# Build JS
npm run build
# Watch for changes
npm run watch
# Run unit tests
npm test
# Re-run tests on changes
npm run test:watch