Giter Site home page Giter Site logo

openmove / otp-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opentripplanner/otp-ui

0.0 1.0 0.0 6.04 MB

React component library, which can be used to build trip planner webapps.

Home Page: http://www.opentripplanner.org/otp-ui/?path=/story/transitvehicleoverlay--real-time-rectangles

License: MIT License

JavaScript 99.95% CSS 0.05%

otp-ui's Introduction

OTP-UI React Component Library

Description

React component library, which can be used to build trip planner webapps.

See:

Getting Started

 git checkout https://github.com/opentripplanner/otp-ui.git
 yarn install
 yarn dev # (opens storybook to running component library on localhost:5555)

Development

Some packages in otp-ui depend on sibling packages (e.g., @opentripplanner/core-utils is used by many of its siblings). In order to test a package with local changes you have made to its sibling, you can run the following find/replace operations to make sure you're depending on your latest work (and not the released version):

  1. In the package.json files for packages in which you want to test the sibling, find and replace (package-to-test being the package with local changes -- make sure these are committed to first to avoid the find/replace operations below polluting your work):

    "@opentripplanner/package-to-test": "current-version"

    with

    "@opentripplanner/package-to-test": "file:../package-to-test"

  2. In your source files, find and replace:

    opentripplanner/package-to-test/lib/types

    with

    opentripplanner/package-to-test/src/types

  3. Run: yarn && yarn dev

Stack

A Monorepo with multiple packages and a shared build, test, and release process.

  • πŸ‰ Lerna β€Š- The Monorepo manager
  • πŸ“¦ Yarn Workspacesβ€Š - β€ŠSane multi-package management
  • πŸš€ Reactβ€Š - β€ŠJavaScript library for user interfaces
  • πŸ’… styled-componentsβ€Š -β€Š CSS in JS elegance
  • πŸ›  Babelβ€Š - β€ŠCompiles next-gen JavaScript
  • πŸ“– Storybook - UI Component Environment
  • πŸƒ Jestβ€Š -β€Š Unit/Snapshot Testing

Usage

  • yarn dev - This starts Storybook for viewing all the components locally.
  • yarn bootstrap - This installs all of the packages and links dependent packages together.
  • yarn preppublish - This babelfies all of the packages and creates /lib folders for each one.
  • yarn unit - Run jest unit tests.
  • yarn coverage - Shows jest unit coverage.
  • npx lerna changed - Show which packages have changed.
  • npx lerna diff - Show specifically what files have cause the packages to change.
  • npx lerna create <packageName> - Creates new package and walks through setting up package.json

Lerna Publish to NPM

Some commands you might need to execute for lerna to publish to npm:

 npm whoami
 (if whomai comes back null, then: npm login; npm config set access public)
 npx lerna changed
 npx lerna publish  # option 1: default publish
 npx lerna publish 0.0.21 --force-publish=*  # option 2: publish all components to version X
 yarn deploy-storybook

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.