khaledosman / microfrontends-webcomponents-monorepo-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lerna Conventional Commits Commitizen friendly JavaScript Style Guide

Intro

Template that can be used for working with monorepositories in typescript / javascript and automated changelog generation. Solves problems like versioning, publishing, dependencies between packages, developing both the depending and dependant packages at the same time, building/installing all packages dependencies with one command, besides having the benefits of typescript and definition files..

How to create a new package

  1. lerna create <package-name>
  2. create a src/index.ts file
  3. copy tsconfig.json from one of the other files which extends the root tsconfig file
  4. add "typings": "lib/index.d.ts" in package.json to link to the generated .d.ts file for types reference
  5. Make sure the main property is set to the output lib/index.js file in package.json
  6. add build and watch scripts in package.json

Starting the project

  1. Use yarn build or yarn watch to compile all packages into javascript and optionally recompile on file changes
  2. Use yarn start to run the main project or the playground which uses the shared packages

Publishing / Releasing

  1. run yarn publish

About


Languages

Language:Vue 69.7%Language:CSS 13.9%Language:TypeScript 9.5%Language:HTML 4.3%Language:JavaScript 2.6%