Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.
/ redux-scripts Public archive

Custom configuration and scripts for create-react-app

License

Notifications You must be signed in to change notification settings

glarivie/redux-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-scripts

create-react-app with HMR, Redux, SCSS modules and paths aliases without ejecting ! The project also come with react-router-v4, eslint and a standard default template.

How to use

yarn add --global create-react-app
create-react-app demo --scripts-version redux-scripts
cd demo
yarn start

Hot Modules Reload (HMR)

More informations: here !

Aliases

No need to provide primary folder full path, you can use aliases !

import App from 'containers/App'
import { Flex } from 'components'
import browserHistory from '@/browserHistory'
alias path
@ ./src
components ./src/components
containers ./src/containers
actions ./src/actions
... ./src/...

Works only with templates default folders

SCSS Modules

// Component.js
import styles from './Component.scss'

return (
  <div className={styles.container}>
    ...
  </div>
)
/* Component.scss */
.container {
  width: 100%;
}

Generate scoped CSS by adding unique hash after the className. For example the class container become something like container_6YtR12e. This avoid conflicts between components and encourage more readable code.

About

Custom configuration and scripts for create-react-app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published