transmute/common
2023-08-14 14:36:45 -04:00
..
.gitlab init 2023-08-14 14:36:45 -04:00
src init 2023-08-14 14:36:45 -04:00
tests/utils init 2023-08-14 14:36:45 -04:00
.gitignore init 2023-08-14 14:36:45 -04:00
jest.config.js init 2023-08-14 14:36:45 -04:00
package-lock.json init 2023-08-14 14:36:45 -04:00
package.json init 2023-08-14 14:36:45 -04:00
README.md init 2023-08-14 14:36:45 -04:00
tsconfig.json init 2023-08-14 14:36:45 -04:00

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:

  1. 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
  1. 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:

  1. Install the dependencies: npm install
  2. Build or watch the common library: npm run build or npm run watch
  3. link the library to npm from common's root directory: npm link
  4. 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