Code Monkey home page Code Monkey logo

node-base-monorepo-starter's Introduction

Node Typescript Monorepo Starter

A simple and easy to use typescript monorepo configured for Node. This monorepo uses lerna and yarn workspaces to orchestrate the monorepo.

Table of Contents

  1. Adding new dependencies
  2. Adding new packages
  3. Custom scripts commands


Adding new NPM dependencies

Command Description
yarn add <dependency> -W Adds the NPM dependency to the root package to be used across all packages.
lerna add <dependency> Adds the NPM dependency to ALL packages.
lerna add <dependency> --scope=<package> Adds the NPM dependency to a specific package
lerna add <package> --scope=<package> Adds a local package as a dependency into another specific package. Should run yarn bootstrap first.


Adding new packages

Command Description
lerna create <package> Creates a new package under /packages.


Running packages

Command Description
lerna run start --scope=<package> Run the start command that is available in a specific package under /packages


Custom Scripts Command

These commands are added to package.json as a easy way to run certain combination of commands together.

Command Description
yarn setup Sets up the monorepo.
yarn build Runs all build command that is available in the packages, typically to compile typescripts.
yarn boostrap As the packages are supposed to be typesripts, this command runs yarn tsc first and then lerna bootstrap to bootstrap everything together nicely.
yarn lint Runs all lint command that is available in the packages in parallel.
yarn start Runs all start comamnd that is available in the packages in parallel.
yarn clean Runs all start comamnd that is available in the packages.
yarn clear Runs yarn clean and lerna clean to clean out the monorepo.
yarn reset Cleans and clear the monorepo and then reinstall, build and bootstrap all packages.

node-base-monorepo-starter's People

Contributors

jazzpeh avatar

Watchers

 avatar  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.