8000 GitHub - tomnil/monorepoplate
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tomnil/monorepoplate

Repository files navigation

Monorepoplate

This project demonstates a working monoreposetup.

Setup

  1. Clone.
  2. run npm install
  3. Start vscode (or maybe restart vscode)

Some commands

Watch all files with typescript, and rebuild changed packages automatically

tsc -b -v -w -i

Create link from node_modules\@suzieq\packagename to .\packages\packagename

npm install   #:)

Run a script

# In the current workspace
npm run eslint

# Across all workspaces
npm run eslint -ws

# For a specific workspace
npm run eslint -w .\packages\Products
npm run eslint -w @suzieq/products

Add external npm package to local package

# change directory to monorepo root
cd .

# Use the syntax you prefer
npm install axios -w .\packages\Products
npm install axios -w @suzieq/products

Add reference between two local packages

Open package.json and add this under devDependencies or dependencies.

See package.json for an example.

    "@suzieq/emailhelper": "*",

Two processes working together

Start in two terminal windows:

tsc -b -v -w -i
nodemon superbin\index.js

When a file is changed in a package, tsc will transpile to bin which reloads nodemon.

Full article

I've written a very detailed article on the subject, it can be found here: ___

Enjoy :)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0