React Starter kit, with styled-components, storybook, redux, saga, husky, prettier, tests and more...
- Full ES6
- Webpack 4 with minimum configuration, you have webpack.common.js with webpack.dev.js & webpack.prod.js;
- You are no longer styling HTML elements or components based on their class or HTML element - Styled-Components;
- The UI development environment with Storybook
- Test with jest;
- Code Analyzer;
- Automatic code prettier before push (on
git commit .
); - Redux & Redux-Saga;
- & Much more...
- Install Node.js 10 & Python
git clone https://github.com/LukaGiorgadze/react-styled-kit.git
cd ./scfrontend
(cloned directory)npm install
npm start
npm test
- Run all testsnpm run test:watch
- Run all tests with watchnpm start
- Start the projectnpm build
- Build production codenpm analyze
- Analyze codenpm pretty
- Pretty your ugly codenpm storybook
- UI component environment
- Overview
- Basic configuration
- Files and Directories
- UI Components
- Storybook for UI Components
- Testing
- React Components (Layouts and Views)
- Redux and Redux-Saga
- Code Analyze and Pretty
This application is based on react & redux, only front-end. So, if you want some backend services on your server, or something else, you have to setup express server and webpack-dev-middleware and uninstall webpack-dev-server.
In webpack.common.js file, you can change main entry file, for example, default entry is index.jsx,
you can change it from: module.exports = { entry: "index.jsx"...
,
output bundle from output: module.exports = { ... { filename: "bundle.js" }...
You can also configure webpack for development in webpack.dev.js and for production webpack.prod.js
- actions - Redux actions
- components - React components/layouts/views
- reducers - Redux reducers
- sagas - Redux Sagas
- ui - UI Components
All test and stories files are located in folder of component, for example:
- /ui/elements/
- button.jsx
- button.test.jsx
- button.stories.jsx
- slider.jsx
- slider.test.jsx
- slider.stories.jsx
We have aliases for shorten directory (component/file) access, for example, if you want to import something from
./ui/ folder to components file, you had something like this:
import { Button } from "../../ui/elements/button/index";
with aliases, you need to specify only root folder: import { Button } from "ui/elements/button/index";
all aliases:
'public/...'
'components/...'
'ui/...'
'actions/...'
'reducers/...'
'sagas/...'