Frontend of PyCon TW official website.
- node >= 14.21.3
You can refer to
package.jsonfile for more details.
-
Clone this repository.
-
Add Environment Variables to configure this project:
export BUILD_TARGET=server export HOST=127.0.0.1 export BASE_URL=http://127.0.0.1:9876 export API_URL_BROWSER=http://127.0.0.1:9876 export VUE_DEVTOOL=true
-
Install dependencies:
npm install
-
Serve with hot reload at
localhost:3000:npm run dev
-
Also, we have mock server to handle API on local:
# You need to add Environment Variables(Step.2). Otherwise, some of the pages may not work correctly. npm run json-server
- Clone this repository.
- Simply run the docker-compose commands to launch or stop the mock API server & the dev server:
# Launch the dev server and the mock API server
docker-compose -f ./docker-compose-dev.yml up
# Stop the dev server and the mock API server
docker-compose -f ./docker-compose-dev.yml down- You can choose method 1 or method 2 to build setup, then you can start to contribute. π
- Please follow Github Flow.
npm run build
npm run start
# Or just run:
npm run serveNote: Make sure the .env file has the correct API_URL_BROWSER value when building for different environments (e.g., staging and production).
npm run generategit checkout pycontw-2021- (Optional) Install dependencies
npm i-
Edit
nuxt.config.jsand setDEFAULT_BASE_URLto the corresponding API endpoint likehttps://tw.pycon.org/prs. -
Generate static project
ROUTER_BASE="/2021/" npm run generatenpm run lintFor detailed explanation on how things work, check out Nuxt.js docs.