This boilerplate introduces a simple way for developing serverless React applications, which are perfect for serving from Github Pages.
- Webpack@3 as module bundler
- Babel with babel-preset-env for js and jsx transpiling
- react-hot-loader@4 for extremely fast hot updates
- Eslint and Stylelint for linting
- Prettier for automated code formatting
- Jest with Enzyme for testing
- CSS Modules, Sass and PostCSS with Autoprefixer for styles processing
- Storybook for painless UI development and testing
- react@16
- redux
- react-router@4 with HashRouter (perfectly suits Github Pages environment)
- react-redux
- axios with redux-axios-middleware
- ramda and lodash as utility libraries (unused parts will be cut off with babel and webpack plugins)
- react-icons
- Clone
git clone https://github.com/rtivital/react-pages-boilerplate
or download this repository. - (Optional) Run
nvm use
. This will ensure that you are running the supported version of Node.js. You can nvm installation instructions here. - Install dependencies:
npm install
- Run the project:
npm start
- Remove git folder with
npm run clean:git
(this will remove .git folder attached to react-pages-boilerplate) and follow these instructions to init new Github repository and enable publishing to Gihub Pages.
npm start
– starts development server with webpack-dev-servernpm test
– runs tests with Jestnpm run build
– builds project to production (Note that the result bundle is not suitable for hosting on Github Pages, usenpm run deploy
to build and deploy to Github Pages)npm run deploy
– builds and deploys project to Github pagesnpm run lint
– lints both JavaScript (withnpm run lint:js
) and Sass files (withnpm run lint:scss
)npm run storybook
– starts storybook server on port 9001npm run prettier
– format js and jsx files with prettier
See releases section to get information about new cool features added to the project.