zrt / chafan-frontend

PWA for Chafan

Home Page:https://cha.fan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chafan PWA

Local development setup

Step 1: Install dependencies

First, install NodeJS, npm and yarn on your OS. Then:

yarn install

Build for development and run hot-reload website:

yarn run serve

The default server connected in this setting is hosted at https://chafan-test.herokuapp.com with free dyno. Thus, it might be slow when you open it since the dyno will be suspended when unused for a long time and will take a minute to restart.

Screen Shot 2021-11-20 at 13 07 28

Open the "Network" URL in your browser.

Showcase

When developing locally, you can see /showcase for individual static components, for exploration and design purpose. For example:

Build production and serve locally through https

Prepare the dependencies:

brew install mkcert
mkcert -install
mkcert localhost
npm install -g serve

Build and serve:

VUE_APP_ENV=staging yarn run build
serve -l 8080 -s dist --ssl-cert ./localhost.pem --ssl-key ./localhost-key.pem

CI-built master previews

master will be deployed to https://chafan-test.netlify.app from time to time.

Please contact @izgzhen to get a invitation link to the test site. Notice that you can fill in any random verification code during registration.

If you opened a PR against master branch, Netlify will build a preview website too.

Analyze production build

yarn run analyze

Unit tests

yarn run test:unit

Lints and fixes files

Checks:

yarn run check:eslint
yarn run check:prettier

Fixes all:

make fix

Debugging

https://github.com/Microsoft/vscode-recipes/tree/master/vuejs-cli

Dependency management

Render dependency tree:

npm ls <package-name>

Upgrade general dependency:

yarn upgrade <package-name>

Contributing

CONTRIBUTING.md

About

PWA for Chafan

https://cha.fan

License:Apache License 2.0


Languages

Language:Vue 76.6%Language:TypeScript 21.4%Language:JavaScript 0.8%Language:SCSS 0.6%Language:HTML 0.5%Language:Makefile 0.0%