https://github.com/sky172839465/cwa-shop
https://github.com/sky172839465/cwa-shop
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sky172839465/cwa-shop
- Owner: sky172839465
- Created: 2023-09-30T18:11:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-10T01:37:21.000Z (about 1 month ago)
- Last Synced: 2025-09-10T05:04:04.106Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://sky172839465.github.io/cwa-shop/
- Size: 2.06 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
CWA SHOP
![]()
![]()
environment
NodeJS
18.15.0
quick start
1. fork repo
1. clone repo from your account
```shell
git clone https://github.com/YOUR_ACCOUNT/cwa-shop.git
```
1. open in vscode
```shell
code ./cwa-shop
```
1. install dependencies
```shell
npm i
```
1. start dev server
```shell
npm run dev
```development
1. create change and commit to your remote branch
1. send pull-request
1. wait for status check success
- check linter
1. merge pr
1. trigger `main` branch push ci
- check linter
- bump version
- upload to github pagepackage 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