Giter Club home page Giter Club logo

mithril-pnpm's Introduction

@mpnpm

An example monorepo strap. The project can be used as a starting point for pnpm projects. Provides a series of packages that are consumed by various modules across the workspace. It includes a couple of packages that can be used in a bundle and/or build processes.

It is rather opinionated and the approaches employed are mostly geared towards mithril users.

Usage

Clone the repository and cd into root, then run:

pnpm i

You can then cd into different packages (mainly api and app). While you can execute commands from root, it is just best to cd into the directories you are working within. Look at pnpm filtering to understand and better leverage workspace executions from different locations.

The entire workspace is built in postinstall

Commands

Every package has the following commands:

pnpm dev      Starts development in watch mode
pnpm build    Runs a production build

If you are calling these from root directory:

pnpm dev   <pkg>  Start development for a specific package from root
pnpm build <pkg>  Runs a production build on specific package from root

/build

This directory contains build specific packages, they are:

@mpnpm/tsconfig

This is a shareable tsconfig.json that each package that is TypeScript based can extend upon. It includes just some basic defaults.

@mpnpm/rollup-config

This is a shareable Rollup configuration. It can be imported in each package for bundling TypeScript or JavaScript files. It exposes several commonly used plugins and some utils.

@mpnpm/prettier-config

This is a shareable Prettier config. Extend configuration from within package.json files, eg:

{
  "prettier": "@mpnpm/prettier-config"
}

@mpnpm/eslint-config

This is a shareable ESLint config. Extend configuration from within package.json files, eg:

{
  "eslintConfig": {
    "ignorePatterns": ["*.html"],
    "extends": ["@mpnpm/eslint-config"],
    "rules": {}
  }
}

/packages

This directory contains non-build specific packages, those which would be a library, application, module or something else. Contained within this example is the following:

@mpnpm/api

This is a simple package that has some exported members that can be consumed in different package/s.

@mpnpm/app

This is a basic mithril app that uses @mpnpm/api and is bundling using Rollup and TypeScript. It demonstrates a private package using workspace packages.

mithril-pnpm's People

Contributors

panoply avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.