This is a simple boilerplate that has been developed to make it easier to develop React components and small projects.
Check out SurviveJS - Webpack and React to dig deeper into the topic.
Clone the repo : git clone https://github.com/survivejs/react-component-boilerplate my-component
.
To get started with fresh history, do this:
cd my-component
rm -rf .git
(or in Windows rmdir .git /S /Q
) - Remove Git databasegit init
- Initialize a new Git repositorygit add .
- Add all files to staginggit commit -am "Initial commit"
- Commit the filesAfter this you should push the project to some remote.
If you want to replace project meta information (author etc.), consider using a tool like replace-project-meta.
HOST
, PORT
).The test setup is based on Jest. Code coverage report is generated to coverage/
. The coverage information is also uploaded to codecov.io after a successful Travis build.
test:watch
too.The boilerplate includes a GitHub Pages specific portion for setting up a documentation site for the component. The main commands handle with the details for you. Sometimes you might want to generate and deploy it by hand, or just investigate the generated bundle.
./gh-pages
directory../gh-pages
to the gh-pages
branch. GitHub will pick this up automatically. Your site will be available through *var a = 5;
var b = 10;
// just trying out code highlighting feature here
console.log(a + b);
react-component-boilerplate is available under MIT. See LICENSE for more details.