An opinionated template for Monorepo and best practices for ECMAScript eco-system technologies and projects.
This repo contains several sub-packages each demonstrating best practices in different ECMAScript related technology / scenario.
This repository is meant to be used as a starting point when creating a new monorepo project. The consumption process is currently a manual step by step guide.
Clone/Copy/Download this repo.
Choose which of the sub-packages templates are relevant to you, and delete the others.
Change the name
fields of the remaining packages/*/package.json
files to fit your new project.
Delete the contents of the README.md files in both the root and the sub-packages.
Reset the version
field in the lerna.json to your project's initial version number.
0.1.0
or 0.0.1
.Adjust coverage thresholds in the nyc.config.js.
Adjust CONTRIBUTING.md code coverage section.
cla-assistant
link in the CONTRIBUTING.md legal section.Update the Legal Related files (copyrights/notices/disclaimer).
If you kept VSCode extension templates, also adjust the displayName
and publisher
fields
in their package.json
files to fit your new project.
If you have not kept any VSCode extensions in your monorepo, remove the root vscode webpack config.
Adjust the circle-ci config.yml. There are three possible sections that may need to be removed (and their references):
deploy-npm
--> if your project should not deploy any npm library to npmjs.com.prepare-vsix
and deploy-gh-releases
--> if your project does not include VSCode extensions.Adjust the .eslintrc.js configuration.
overrides
sections for no longer relevant file types:
["*.ts"]
--> if your monorepo does not contain any TypeScript sources (including .d.ts
files).["*.vue"]
--> if your monorepo does not contain any vue frontend projects.dev-depedencies
from the root package.json
@typescript-eslint/*
--> if your monorepo does not contain any TypeScript projects.eslint-plugin-vue
--> if your monorepo does not contain any vue frontend projects.Adjust root TypeScript configurations.
compile
and compile:watch
scripts from the root package.json.Adjust lint-staged configurations.
lint-staged
field and its keys in the root package.json.vue
suffixes.In your terminal, navigate to root of the monorepo and:
yarn
to update the yarn.lock file.yarn run ci
to test the full build flow.You may now commit/push your new mono-repo template project to your new git repo and start coding.
Please open an issue on Github.
Contributions are most welcome.