GithubHelp home page GithubHelp logo

cwa-shop's Introduction

CWA SHOP ICON  CWA SHOP

environment

NodeJS
18.15.0

quick start

  1. fork repo
  2. clone repo from your account
    git clone https://github.com/YOUR_ACCOUNT/cwa-shop.git
  3. open in vscode
    code ./cwa-shop
  4. install dependencies
    npm i
  5. start dev server
    npm run dev

development

  1. create change and commit to your remote branch
  2. send pull-request
  3. wait for status check success
    • check linter
  4. merge pr
  5. trigger main branch push ci
    • check linter
    • bump version
    • upload to github page

package usage

package description
tailwindcss style element in classname
daisyui styled component with tailwindcss
i18next i18n package
react-router-dom single page application router
recoil global react state management
swr request status management
formik control form flow
yup form validation using in formik
dev package description
husky git commit hook
lint-staged git hook trigger when staged files
vite modern frontend development toolkit

npm script usage

script description
npm run dev localhost start dev server
npm run dev:mock localhost start dev server and mock api by `vite-plugin-mock`
npm run dev:mockapi localhost start dev server and mock api in promise object WITHOUT SEND REQUEST
npm run build build in production
npm run build:gh build in production for github page special environment(BrowerRoute not working)
npm run lint check {js,jsx} coding style
npm run lint:fix fix {js,jsx} incorrect coding style if possible
npm run preview local start server for bundled file under `/dist` folder
npm run prepare run on `npm i` / `npm install`, auto install `husky` for git hook
npm run prettier check {json,md,yml,sh} coding style
npm run prettier:fix fix {json,md,yml,sh} incorrect coding style if possible
npm run style check {css} coding style
npm run style:fix fix {css} incorrect coding style if possible

environment variable

variable description
MOCK
  • `npm run dev` mock jsonplaceholder api
  • `npm run build` using mock data when fetch data failed
MOCK_AWS_API mock aws api url start with `/${VITE_AWS_HOST_PREFIX}`(variable from env file)
BASENAME replace route basename to `/cwa-shop` (only for github page)

query string

variable description example
MOCK using MOCK=0 in url will force disabled api mock, useful in gh-page website (default all request in mock mode) https://sky172839465.github.io/cwa-shop/internal?MOCK=0

cwa-shop's People

Contributors

sky172839465 avatar yehchitsai avatar dependabot[bot] avatar github-actions[bot] avatar

Watchers

 avatar  avatar

Forkers

yehchitsai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.