Skip to content

vectorKim3333/react-component-boilerplate

 
 

Repository files navigation

react-component-boilerplate

why use react-component-boilerplate?

when we make web production by react we have to make too many component (sometime we did create similar) if you are senior you will make again what has already been done it solution is isolated component

so i'm composed react-component development template

develop setting

recommend yarn for zero-install

this boilerplate developed on yarn berry

always node_modules bigger any other lang package if you use yarn-barry you can use zero-install and pnp

how to install yarn

build

yarn workspace @react-component-boilerplate/component install
yarn
yarn build:component # bundle to dist

dir structure

monorepo

/.github           # git actions ci script
/.husky            # husky working before commit and push for lint, jest
/.yarn             # if you use yarn-berry
/packages          # monorepo   
    /exmaple           # smaple react site repo
      /src
      /package.json 
    /react-component   # real components
        / dist              # build bundle
        /src               # component code you can use scss and typesciprt
          /index.tsx
          /index.scss
        /rollup.config.js # bundler config if use external dependency check it
/.eslintrc
/.gitgnore
/.prettierignore
/.prettierrc      # formatting like semi, line, break
/package.json

test (not yet)

support unit and e2e both

unit test working on jest e2e test working on cypress

#jest
yarn test:component
#e2e 
#testing dir is /example
#end to end test required react-component dist
yarn workspace @react-component-boilerplate/component install
yarn build:component

# move to example site
yarn 
yarn test:e2e

CI rule (not yet)

when we develop software CI is most important thing this template use git-action if you do not want ci removed ./github/workflows

About

simple boilerplate for single component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 67.6%
  • JavaScript 11.8%
  • HTML 11.4%
  • CSS 6.2%
  • SCSS 3.0%