Giter Site home page Giter Site logo

lucalanca / monorepo-typescript-next-the-sane-way Goto Github PK

View Code? Open in Web Editor NEW

This project forked from martpie/monorepo-typescript-next-the-sane-way

0.0 2.0 0.0 478 KB

A monorepo example using TypeScript and Next.js

License: MIT License

JavaScript 39.78% TypeScript 60.22%

monorepo-typescript-next-the-sane-way's Introduction

Monorepo + TypeScript + Next.js: The Sane Way

This repo is an experiment to set-up a monorepo using TypeScript and some shared config. Everything is not perfect and "real-world" ready, but it should be a good first step.

  • Strict TypeScript: potential bugs are not an option
  • Transpiled server-side code: needed if you are going to re-use modules for both client and server-side
  • Jest support
  • One TypeScript config to rule them all: consistency first
  • One TSLint config to rule them all: no need to be masochist
  • One Jest config to rule them all: keep things sane (you can filter tests by Regex anyway)
  • Transpile local modules with Next.js on-demand

More in details

TypeScript

The config is at the root: <root>/tsconfig.json.

Jest

Unit tests are to be but in a __tests__ folder to match the Jest philosophy and not pollute your directories too much.

The config is at the root.

TSLint

Use the config you want in <root>/tslint.json. The default uses semistandard.

Root folder

Put everything you want there, a Next app, shared code, a react-native app, a CRA, even a Wordpress app if you want.

To-do

  • Different Types definitions per projects: a definition Type for a website may not be shared with a react-native app for example (global types are currently shared across modules)
  • ...

Eventually:

  • Cypress support?

monorepo-typescript-next-the-sane-way's People

Contributors

martpie avatar lucalanca avatar

Watchers

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