Giter Site home page Giter Site logo

mono_repo_template's Introduction

Monorepo Starter (WIP)

Airbnb-standard-style MIT License Monorepo Maintained With Lerna tested with mocha

Description

Template for creating a Mono Repository using Lerna, (a tool for managing JavaScript projects with multiple packages/applications/components). This template was originally created for a project that I was working on that consisted of a graphical user interface (GUI) and several interconnected node js microservices Rather than put everything into a single application path I created a repository that had each component in it's own "package". This way each microservice could be developed independently as could the GUI.

Uses Lerna to manage the mono repository

To start a new project clone this repo then do a

npm install

Then, to create a new package, use "lerna"

npx lerna create <Package Name>

Add package specific scripts to the root package.json file:

"test_pkg1": "npx lerna run test --scope pkg1",
"lint_pkg1": "npx lerna run lint --scope pkg1"

Add matching scripts to individual package package.json files:

"test": "npx mocha \"__tests__/*.test.js\" --reporter mochawesome --reporter-options reportDir=reports,reportFilename=test_report,reportTitle=\"test_report\",reportPageTitle=\"Test-Report\"",
"lint": "eslint lib/*.js -f html -o 'reports/lint_report.html"

Include an env_template.env as a sample for any .env file needed. The template should only show what variables are needed not any specific data.

mono_repo_template's People

Contributors

barlowm avatar

Watchers

James Cloos 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.