Giter Club home page Giter Club logo

generator-react-webpack's Introduction

generator-react-webpack V2.0 - MBC3 Version

About

Generator-React-Webpack will help you build new React projects using modern technologies. This is an edited version of generator-react-webpack to serve mbc3 style project components

Please visit: https://github.com/newtriks/generator-react-webpack for more info.

Generators that extend generator-react-webpack


Installation

# Make sure yeomean installed globally
npm install -g yo
pull repo in AppData/Roaming/npm/node_modules
cd into AppData/Roaming/npm/node_modules/generator-react-webpack
npm install

Generating new components

# cd into project
yo react-webpack:component fileName

The above command will create a new component, a package.json and a stylesheet all in the same folder in src/components/fileName

Generating new stateless functional components

yo react-webpack:component fileName --stateless

Stateless functional components where introduced in React v0.14. They have a much shorter syntax than regular ones and no state or lifecycle methods at all. Please read the React 0.14 release notes to get more information about those components.

Note: You will still be able to set properties for stateless components!

Adding PostCSS plugins

If you have enabled PostCSS at generation time, install your PostCSS plugins via npm and require it in postcss function in cfg/base.js.

Example for autoprefixer:

cd my-new-project
npm install autoprefixer

Require in cfg/base.js

...
postcss: function () {
  return [
    require('autoprefixer')({
      browsers: ['last 2 versions', 'ie >= 8']
    })
  ];
}
...

generator-react-webpack's People

Contributors

newtriks avatar weblogixx avatar colch avatar yonatanmn avatar stylesuxx avatar lukeavery92 avatar me97esn avatar crshoverride avatar chrisolsen avatar shraymonks avatar victor-homyakov avatar framp avatar cmil avatar guifromrio avatar vovanr avatar d-i-b avatar andrewliebchen avatar ansavvides avatar akampjes avatar bitdeli-chef avatar leafle avatar daannijkamp avatar dbanck avatar semigradsky avatar halkeye avatar jamesmanning avatar anomen avatar skfd avatar maksimr avatar manuphatak 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.