Package Exports
- react-component-starter-test
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-component-starter-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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 publishUsers 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 starthosting 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-pagesIf you have an specific documentation in your component you can add that in docs/README.md
testing
npm run testbuild-scripts
| Script | Action |
|---|---|
start |
Run Dev Server |
build |
compile example and build common:js |
build:commonjs |
build common:js to lib |
test |
run unit tests |
test:watch |
run unit tests with watch |
examples
[tbd]
=
built by @clintonhalpin