tup-js

0.0.1 • Public • Published

tup-js

ThredUP JavaScript Packages

About

This is intended to be a monorepo of small, independantly versioned packages that are shared across applications.

Lerna is used to attempt to optimize this workflow.

Getting Started

Install and link dependencies:

npm run bootstrap

Adding a new package

  • Add a new directory for the package under packages
  • Follow common directory conventions:
    • src - all the source code for the package
    • dist - build output
    • test - unit tests
  • Provde common npm scripts:
    • lint - eslint rules are pre-configured at the project root
    • test - run unit tests
    • test-ci - run unit tests with code coverage and output test resuls in JUnit format for CI
    • clean - delete build artifacts
    • cover - code coverage
    • cover:check - check if code coverage is within tolerance
    • build - run babel compilation, if required
    • prepare - run lint, test, clean, and build

Commit messages

Please use convential commits to help communicate the nature of changes, generate the changelog and for determining the version bump.

Publishing a package

  • Get your PR reviewed/merged

  • Locally update your master branch git pull origin master

  • Publish new version of the packages to npm

    • without 2FA enabled
    npm run publish
    • with 2FA enabled

    If your npm login has 2FA enabled, use your authenticator app to get a 2FA code and set as an environment variable:

    NPM_CONFIG_OTP=12345 npm run publish
  • Push your local master branch to origin git push origin master

Other commands

Run tests for all packages

npm test

Run linter for all packages

npm run lint

Run code coverage for all packages

npm run cover

Remove node_modules for all packages

npm run clean

Build all packages

npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i tup-js

Weekly Downloads

3

Version

0.0.1

License

UNLICENSED

Unpacked Size

41.8 kB

Total Files

28

Last publish

Collaborators

  • brandondoran