boilerplate-react-component
You can view a demo here.
Quick Start
npm i
npm run i:demo
npm start
Publishing
In order to publish and deploy your new package via TravisCI, you need to go through the following steps.
-
Modify the
.travis.yml
with your own npm details. The simplest way to do this is by following this guide or runningtravis setup npm
. -
To deploy the demo to a gh-pages branch you need to make a Github token with
repo
orpublic_repo
access by going to your Github settings. This token should be accessed viaprocess.env.GITHUB_TOKEN
. Either add it via the Travis UI or runtravis encrypt -r GITHUB_TOKEN=[the token here]
to add it to your travis.yml. Be warned if you have collaborators, this gives access to all your repositories. -
Run
npm version <newversion>
as per the npm docs. This will create a tagged commit that is pushed to the repository and will start the TraviCI test, deployment and publish.
Browser support
Update the browserslist
file in the root directory to change the browser support. This is primarily used for CSS autoprefixing.
TODO
- Install demo dependencies as post install
- Better build logging
- Remove
dist
from importing css files. - define plugin for
process.env
variables. - Document