GithubHelp home page GithubHelp logo

chicagopcdc / gen3-frontend-framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uc-cdis/gen3-frontend-framework

0.0 0.0 0.0 16.27 MB

A Frontend Framework for Gen3 data portals

License: Apache License 2.0

Shell 0.12% JavaScript 21.92% TypeScript 73.72% CSS 2.13% Dockerfile 1.10% MDX 1.01%

gen3-frontend-framework's Introduction

CTDS Frontend Framework

Installation

Prerequisites

This is a multi-workspace repo that requires npm v8. The minimum node version is set to v16 only from an LTS perspective.

Node can be downloaded from the official Node.js site. You may also consider using a Node version manager.

Your version of Node may not ship with npm v8. To install it, run:

npm install npm@8

Install Dependencies

From the root of the project, install dependencies by running:

npm install

Installing from the root of the repository is required to avoid multiple installations of React in the workspaces. When this happens, React will fail to render.

Adding Depenedencies

Dependencies can also be installed from the root of the repository. To install a dependency for a specific workspace, you can run:

npm install --save my-package --workspace=packages/core

Since this is a TypeScript project, installing the community type definitions may also be required:

npm install --save-dev @types/my-package --workspace=packages/core

Development

Run the prototype in dev mode with auto-rebuilding:

npm run dev

By default, this will start a dev server listening to http://localhost:3000

Note: Recompiling the type definitions for core needs to be done manually:

npm run compile --w=packages/core

Linting

Run ESLint for all of the workspaces:

npm run lint

Formatting

Run prettier for all of the workspaces:

npm run format

Testing

This project uses jest for testing.

Naming Convention

Test Type Filename
Unit *.unit.test.ts
Integration *.int.test.ts

Locations

Tests should live in the same directory as if a single module is under test. Since unit tests should only test a single module, they should also live in the directory. For example,

+ /src
| - monarch.ts
| - monarch.unit.ts
| - monarch.int.ts

Running tests

npm run test will run unit tests.

npm run test:int will run integration tests.

npm run test:all will run both unit and integration tests.

Deployment

docker build -t frontend . will build a container with all available packages built

docker run -p 3000:3000 -it frontend will run the container from above.

The container can be viewed at localhost:3000{BASE_PATH | /}

Note that the base path is configurable with the BASE_PATH environment variable. It is left empty by default when running locally

gen3-frontend-framework's People

Contributors

mfshao avatar mcannalte avatar dependabot[bot] avatar craigrbarnes avatar ocshawn avatar hughestr avatar xritter1 avatar haraprasadj avatar piotrsenkow avatar ciresiemanym avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.