1.0.2 • Published 9 years ago

react-component-starter-test v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

react-component-boilerplate

A nice setup for creating react components that can be consumed as NPM modules. example

creating a component

git clone git@github.com:clintonhalpin/react-component-boilerplate.git YOUR_COMPONENT_NAME

# Update the following exports and folder/file names with your component name eg. MyComponent -> Slider
package.json, src/MyComponent, src/MyComponent/index.js, example/index.js, README.md

# Now work on your component
# When complete run
npm run build
npm publish

Users will be able to consume your component by running npm install YOUR_COMPONENT_NAME --save and importing it!

development

Run's webpack and starts a tiny express server for testing

npm i 
npm run start

hosting an example ( gh-pages )

By default components come with an examples page it order to publish that

npm run build
git add . -A
git commit -m "Your message"
git push origin gh-pages

If you have an specific documentation in your component you can add that in docs/README.md

testing

npm run test

build-scripts

ScriptAction
startRun Dev Server
buildcompile example and build common:js
build:commonjsbuild common:js to lib
testrun unit tests
test:watchrun unit tests with watch

examples

tbd

=

built by @clintonhalpin