Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.
/ hestialabs Public archive

(this repo has been merged into hestialabs-experiences)

License

Unknown, AGPL-3.0 licenses found

Licenses found

Unknown
LICENSE.md
AGPL-3.0
COPYING.md
Notifications You must be signed in to change notification settings

hestiaAI/hestialabs

Repository files navigation

HestiaLabs


Lerna TypeScript webpack ESLint Prettier Babel

Instructions

Read the following instructions carefully before getting started.

Setup

Install all packages:

npm install

Set up pre-commit hooks:

npm run prepare

Develop

Start developing:

npm run dev

This runs webpack in watch mode, building the packages once and then watching all files for changes. If one file is updated, the code is recompiled so you don’t have to run the full build manually.

Build

Build all packages:

npm run build

Test

Run tests for all packages:

npm test

Run test for one or more packages:

npm run test:ts-node -- <package1> [<package2> ...]

Package management

This section explains how packages are created and updated

Create a new package

  1. Create a new folder in the packages directory. By convention, the folder name is also the package name.

  2. Add a src folder with the required index.ts entry file.

  3. Add a package.json that looks like this:

{
  "name": "@hestiaai/<NAME>",
  "version": "0.0.0",
  "main": "dist/index",
  "type": "module",
  "files": ["dist"],
  "repository": {
    "type": "git",
    "url": "https://github.com/hestiaai/hestialabs",
    "directory": "packages/<NAME>"
  },
  "publishConfig": {
    "access": "public"
  },
  "author": "",
  "license": "UNLICENSED"
}

Replace <NAME> with the package name.

  1. Add the package name to the experiences Array in dev.json.

  2. Add an export statement for the package in packages.ts. This ensures tests are run for the package.

  3. Re-link the packages workspace to the hestialabs-experiences repo:

npm link --workspaces
cd ../hestialabs-experiences
npm install

Authenticate to GitHub Packages

Follow these instructions to authenticate to GitHub Packages with a personal access token (PAT).

  1. Create a PAT. Select the scopes (permissions) write:packages and delete:packages. Never share your PAT with anybody. You may also use the shared PAT for the organization.

  2. Authenticate. The simplest recommended way is to add your PAT to your ~/.npmrc file in your home directory. Your .npmrc should look like this:

//npm.pkg.github.com/:_authToken=TOKEN
@hestiaai:registry=https://npm.pkg.github.com

IMPORTANT SECURITY NOTE

Your personal token is a secret that must not be shared with others. The shared organization token may be shared internally with relevant personnel. Never add the token to the .npmrc file in the repository. Tokens must never be pushed to GitHub.

Bump version of packages changed since the last release

npm run lerna:version

Documentation of lerna’s version command

You can pass extra arguments to the npm script:

npm run lerna:version -- --no-push
npm run lerna:version -- --force-publish=*

Publish packages

npm run lerna:publish

Documentation of lerna’s publish command

Sources

Notes

$ npm run lerna:version "--" --force-publish

About

(this repo has been merged into hestialabs-experiences)

Topics

Resources

License

Unknown, AGPL-3.0 licenses found

Licenses found

Unknown
LICENSE.md
AGPL-3.0
COPYING.md

Stars

Watchers

Forks

Packages

No packages published