
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
generator-react-component
Advanced tools
Builds a React Component project with useful gulp tasks for development, build and publishing.
See react-component-gulp-tasks for documentation on how to use the gulp tasks.
Install the generator:
npm install -g generator-react-component
Then run the generator:
yo react-component
... and follow the prompts.
Your component source code is in src. You can use JSX and ES6 syntax freely in your component source; it will be transpiled to lib with Babel before being published to npm so that your users will simply be able to include it.
It's a great idea to add a description, documentation and other information to your README.md file, to help people who are interested in using your component.
Preview your component with LiveReload:
npm start
A webserver will be started on localhost:8000 running the examples in example/src.
You can use this playpen to test your component, and then publish it as live examples to GitHub Pages, which is a great way to let potential users try out your component and see what it can do.
npm run lint
Your code will be linted with ESLint, using the Babel parser and the React plugin. You can customise the settings by editing the .eslintrc file.
npm run build
This will build your lib, dist and example/dist folders ready for release.
You can then publish your component to npm and GitHub Pages by running:
npm run release
examplesJust run the examples server; no code will be built or watched, everything in example/dist will be served on localhost:8000.
publish:siteUsually run as part of the release script, this will copy the contents of example/dist to your gh-pages branch and push it.
watchThis task watches the src folder for changes, and builds automatically into lib. This is useful if you are developing your component in another project using npm link.
I'd love to hear it. Open an issue or submit a PR.
MIT. Copyright (c) Jed Watson 2015.
FAQs
Yeoman generator for ReactJS Component projects
We found that generator-react-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.