generator-electrode-component
A Yeoman generator for Electrode React components.
Builds a React component project with useful gulp tasks for development, building, and publishing.
See [electrode-archetype-react-component-component-gulp-tasks] for complete documentation of the gulp tasks.
Contents
Getting Started
Install the generator:
npm install -g generator-electrode-component
Then run the generator:
yo electrode-component
...and follow the prompts.
Developing Your Component
Source
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.
Example and Preview
Preview your component with LiveReload:
gulp demo ; gulp open-demo
A webserver will be started on localhost:4000 running
the examples in demo/examples/*
You can use this code-playground to test your component, then publish it to let potential users try out your component and see what it can do.
Linting and Unit Testing
gulp check
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.
Building and Publishing
gulp build
This will build your lib
, dist
and example/dist
folders for release.
License
Built with ❤️ by Team Electrode @WalmartLabs.