Coder Social home page Coder Social logo

noderaider / modular Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 2.0 454 KB

Scaffold a react monorepo and its component parts.

License: Other

JavaScript 80.73% CSS 3.36% HTML 15.86% Shell 0.05%
react yarn cli ecosystem create-react-app companion modular hot-reloads css-modules webpack2

modular's Introduction

NPM

An unofficial companion ecosystem to create-react-app

Build Status codecov

What is this?

Often react applications can grow extremely large. create-react-app is a very innovative step forward in react apps, encouraging keeping them small by abstracting the build into a separate module (react-scripts). This 'managed' build strategy has many upsides, with the primary drawback being that you cannot modify the build process as easily. @raider/modular is an ecosystem of companion tools to create-react-app to continue in its footsteps, targeting the areas that it does not hit such as CSS modules support, and doing it in such a way that it will encourage project stacks to grow horizontally (many modules) instead of vertically.

Tenets

  • Every module is its own npm package.
  • Every module has built in hot reloading support to work in conjunction with a create-react-app downstream project.
  • Fast yarn installation support with fallback to npm if yarn is not installed.
  • Works on every platform.

PROGRESS

create-component-module react-foo-bar [-t/--with-test-module]

After publishing / linking, you may use the component from your downstream react app like so:

import React from 'react'
import reactFooBar from 'react-foo-bar'

// Create the component
const FooBar = reactFooBar(React)

export default (props) => <FooBar foo="bar" />

Note: Exporting modules as factories sidesteps a wide range of issues causing multiple instances of React in your downstream app.

Utils

Acknowledgements

Special thanks to Facebook for innovations with create-react-app, without it this project would not be possible.

modular's People

Contributors

cchamberlain avatar jamesmgreene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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