Boilerplate for React Components
- React 15.4.1
- PostCSS
- CSSModules
- flow
- webpack dev server
- react-hot-loader 3.0.0
git clone https://github.com/aleksei0807/react-components-boilerplate.git MyComponentDir
cd MyComponentDir
git remote rm origin
git remote add origin https://github.com/username/component-name.git
git add .
git commit -m "initial"
git push origin master
npm i
or yarn
Write your true name, version, description, keywords, author, bugs and homepage in package.json.
Write your name in LICENSE.
Write code of your component in src/index.jsx
. Base styles for your component - src/styles/style.css
. Style themes for your component - src/styles/themes
. Put your component's examples in examples/src
and examples/pages
.
npm run build
npm run dev-server
or PORT=8181 npm run dev-server
default port - 8181.
npm run watch-styles
for watching styles.
npm run watch-examples
for watching files in /examples/src
gulp examples-page-styles