Create-React-App Basis Setup with styled-components, styleguidist, lint-staged
HowTo install this:
- clone repo
yarn install
(ornpm install
)yarn styleguide
// to start styleguide server
Other tasks:
yarn start
// to start dev serveryarn test
// to run javascript testsyarn coverage
// run javascript tests & print coverageyarn build
// to produce minified production buildyarn styleguide:build
// to produce standalone styleguide build
Steps i made
create-react-app cra-basis-setup
yarn add styled-components
yarn add --dev react-styleguidist react-test-renderer webpack flow-bin
yarn flow -- init
This fork enhances the cra-basis-setup with a running backstop-js config and a junit-compatible coverage-report. Additional tasks:
yarn coverage:ci
// run javascript tests & create junit-compatible xml-reportyarn visreg:ref
// to create reference-screenshots for visual regression testsyarn visreg:test
// to test the current applicationyarn visreg:open
// to start the backstop serveryarn visreg:approve
// to approve changes for visual regression tests
yarn run create [type] [name]
// to generate Atoms, Molecules, Constants, Containers etc.
Valid Types are:
- atom
- molecule
- organism
- template
- layout
- constant
- container