Giter Site home page Giter Site logo

monorepo-fundamental's Introduction

Fundamental Architecture

We'll build with Next.js.

Using yarn workspaces to manage projects and packages.

  • ./packages will be the common packages directory.
  • ./apps will be the projects directory.

Code formatting and linting

Please config your editor integration.

Testing

Filename Conventions

Jest will look for test files with any of the following popular naming conventions:

Files with .js suffix in __tests__ folders. Files with .test.js suffix. Files with .spec.js suffix. The .test.js / .spec.js files (or the __tests__ folders) can be located at any depth under the src top level folder.

We recommend to put the test files (or __tests__ folders) next to the code they are testing so that relative imports appear shorter. For example, if App.test.js and App.js are in the same folder, the test just needs to import App from './App' instead of a long relative path. Collocation also helps find tests more quickly in larger projects.

Just put {"test": "jest"} in package.json inside sub workspaces to add test command.

  1. Create babel.config.js inside sub workspaces like this:
module.exports = {
  ...require('../../babel.config.base.js') // eslint-disable-line global-require
};
  1. Create jest.config.js inside sub workspaces like this:
module.exports = {
  ...require('../../jest.config.base'), // eslint-disable-line global-require
  displayName: 'custom display name of your projects'
};

References

monorepo-fundamental's People

Contributors

hulufei avatar

Watchers

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