@lunit/use-shortcut
@lunit/use-shortcut
npm i @lunit/use-shortcut
@lunit/use-shortcut

@lunit/use-shortcut

[Front-End] frontend library

by lunit-io

1.1.0 (see all)License:MITTypeScript:Built-In
npm i @lunit/use-shortcut
Readme

Lunit Front-End Packages

lerna

This repository is a monorepo managed using yarn workspaces, typescript, and lerna. Each public sub-package is independently published to NPM.

Docs

Project structure

  • packages - Node packages.
  • apps - Applications that use packages

Packages

Apps

Install

  1. Clone this repository locally $ git clone git@github.com:lunit-io/frontend-components.git
  2. Install the dependencies. Inside the root $ yarn

Building, running, linting & tests

// build all packages/apps
$ yarn run build
// test all packages/apps
$ yarn run test

Building documentation:

// build documentation. Currently there is only "insight-viewer" project.
$ yarn run doc

Dependency management

Add a devDependency to the root of the workspace

$ yarn add <package name> -WD

Add a sibling package as a dependency to a package/app

package.json

"dependencies": {
    "@lunit/<package name>": "<package version>"
  }

Add a dependency/devDependency to a package/app

$ yarn workspace @lunit/<package_or_app_name_to_be_added_to> add <package_name_to_add...> [-D]

Use Create-React-App

$ cd apps
$ yarn create react-app <app name>

Remove yarn.lock and node_modules folder from the newly genereated CRA project. Add a project name to package.json

{
  "name": "@lunit/<app name>"
}

And then in the root, $ yarn again. All dependencies are hoisted.

When adding project, check this out

workspace name scope

project.json

{
  "name": "@lunit/{PROJECT_NAME}"
}

vscode workspace Usage

  1. click the workspace file in file explore

  2. enter the workspace file in vs code, and click the 'open workspace' button

docs: https://code.visualstudio.com/docs/editor/workspaces

typescript project reference

app tsconfig.json

{
  "references": [
    {
      "path": "../../packages/{PACKAGE_NAME}/tsconfig.build.json"
    }
  ]
}

pacakge tsconfig.json

{
  "compilerOptions": {
    "composite": true
  }
}

Downloads/wk

33

GitHub Stars

20

LAST COMMIT

7mos ago

MAINTAINERS

7

CONTRIBUTORS

18

OPEN ISSUES

9

OPEN PRs

4
VersionTagPublished
1.1.0
latest
3yrs ago
5.0.0-alpha.4
canary
2yrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate