Git Product home page Git Product logo

generator-react-webpack-component's Introduction

DEPRECATED

This generator is no longer under maintenance and instead it is recommend that you use more modern solutions such as Sagui.

However, let me know if you are interested in maintaining and we can maybe find a way forward.

generator-react-webpack-component

A Yeoman generator to create small, reusable React components using webpack and Babel as the build tool.

It bundles the component code into a single UMD JavaScript file (having support for AMD, CommonJS and globals). Initially it contains just React as an external dependency of your component.

Although you might use this generator to create a big applications, its focus it to create small components.

Features

  • ES6 and ES7 syntax support through Babel;
  • No Grunt;
  • No Gulp;
  • EditorConfig already setup;
  • Uses npm as the task runner (ex: npm run build);
  • Development server with live-reload npm run dev;
  • Testing and linting support through Karma (with source-maps) and ESLint;
  • Continuous test execution on file changes npm run watch-test.
  • Be listed on react-components.com and react.parts (react-component keyword).

Getting Started

To install generator-react-webpack-component from npm, run:

npm install -g generator-react-webpack-component

Then create a folder that will hold the component code, such as:

mkdir banana-react-component

Finally, enter in the component folder and initiate the generator:

cd banana-react-component
yo react-webpack-component

Getting To Know Yeoman

If you'd like to get to know Yeoman better, check out the complete Getting Started Guide.

Acknowledgments

I've finally figured out how to make source-maps work thanks to Testing ReactJS Components with Karma and Webpack by Justin Woo.

License

MIT

generator-react-webpack-component's People

Contributors

joeyfigaro avatar maxcnunes avatar nothingeverhappens avatar pirelenito avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

generator-react-webpack-component's Issues

Dependency lock on patch level makes npm run dev fail

I tried using npm run dev recently and saw that it was failing. This is the error:
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v0.10.35
npm ERR! npm v2.1.17
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: webpack-dev-server --inline --hot
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] dev script 'webpack-dev-server --inline --hot'.
npm ERR! This is most likely a problem with the react-loading-simple package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --inline --hot
npm ERR! You can get their info via:
npm ERR! npm owner ls react-loading-simple
npm ERR! There is likely additional logging output above.

I traced it back and found that the addition of these two lines in package.json caused the issue from the commit "locks dependencies on patch level":
"webpack": "~1.5.3",
"webpack-dev-server": "~1.7.0"

I changed the ~ back to ^ and npm run dev worked fine. Not sure what the issue would be, I checked to see if my global install of webpack was breaking this, but after I removed the global installs the issue was the same.

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.