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.
- Getting Started
- Developing Your Component
Install the generator:
npm install -g generator-electrode-component
Then run the generator:
...and follow the prompts.
Developing Your Component
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
README.md file, to help people who are interested in using your
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
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
Your code will be linted with ESLint, using the Babel parser and the React
plugin. You can customise the settings by editing the
Building and Publishing
This will build your
example/dist folders for release.
Built with ❤️ by Team Electrode @WalmartLabs.