Git Product home page Git Product logo

calci's Introduction

Calci

A monorepo that demonstrates workspaces integration with a package-based design.

Folder Structure

.
├── LICENSE
├── README.md
├── node_modules (will be visible on yarn install in root directory)
│   └── @calci
│       ├── adder -> ../../packages/adder (symlinks)
│       └── subtractor -> ../../packages/subtractor (symlinks)
├── package.json
├── packages
│   ├── adder
│   │   ├── index.js
│   │   └── package.json
│   └── subtractor
│       ├── index.js
│       └── package.json
├── test
│   ├── adder
│   │   ├── adder.js
│   │   └── package.json
│   └── subtractor
│       ├── package.json
│       └── subtractor.js
└── yarn.lock

You can find more about yarn workspaces here.

Getting Started

Installation of Necessary Packages

To install all the packages in the monorepo, run:

yarn install

Running Tests

Test @calci/adder

yarn workspace adder test -- <num1> <num2>

Test @calci/subtractor

yarn workspace subtractor test -- <num1> <num2>

Test Both Packages in One Go

yarn run test

The monorepo design along with workspaces makes it possible to use the packages within the repository efficiently. This design pattern also allows developers to publish packages independently to the npm registry.

Publishing Packages

To publish the @calci/adder package to the npm registry, follow these steps:

cd packages/adder # Assuming you are at the root
yarn login
yarn publish --access public

You can find more on package publishing using yarn here.

Helpful Links

calci's People

Contributors

rushikeshpatange avatar

Watchers

 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.