From: Benjamin Auder Date: Wed, 18 Mar 2020 20:16:29 +0000 (+0100) Subject: Refresh REDAME files + fix download_objects script X-Git-Url: https://git.auder.net/img/css/current/pieces/doc/%7B%7B?a=commitdiff_plain;h=68ff39135865a7b68d36b9f0be2633f5296ab091;p=vchess.git Refresh REDAME files + fix download_objects script --- diff --git a/README.md b/README.md index c92b1459..a57c1c1e 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,7 @@ All contributions are welcome! For example, If you wanna help, you can contact me with the form on the website, so that we can discuss what to do and how :) If you feel comfortable with the code a pull request is a good start too. + +### Running the website locally + +Follow the instructions in server/README.md first, and then in client/README.md. diff --git a/client/README.md b/client/README.md index 4a5c464f..25bf68eb 100644 --- a/client/README.md +++ b/client/README.md @@ -1,27 +1,33 @@ # vchess-client ## Project setup -Rename and edit src/parameters.js.dist into parameters.js + +Rename and edit src/parameters.js.dist into parameters.js. Then: ``` +./download_objects.sh npm install ``` ### Compiles and hot-reloads for development + ``` npm run serve ``` ### Compiles and minifies for production + ``` npm run build ``` ### Lints and fixes files + ``` npm run lint ``` ### Customize configuration + See [Configuration Reference](https://cli.vuejs.org/config/). ## Resources diff --git a/client/download_objects.sh b/client/download_objects.sh new file mode 100755 index 00000000..a59fe324 --- /dev/null +++ b/client/download_objects.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Restore binary files (temporary fix - should use git-fat instead) +for color in "w" "b"; do + for piece in "b" "c" "d" "e" "f" "g" "h" "j" "k" "m" "n" "o" "p" "q" "r" "s"; do + rm public/images/pieces/Eightpieces/tmp_png/"$color$piece".png + wget -q -O public/images/pieces/Eightpieces/tmp_png/"$color$piece".png https://vchess.club/images/pieces/Eightpieces/tmp_png/"$color$piece".png + done +done +rm public/sounds/newgame.flac +wget -q -O public/sounds/newgame.flac https://vchess.club/sounds/newgame.flac +rm public/favicon.ico +wget -q -O public/favicon.ico https://vchess.club/favicon.ico diff --git a/download_objects.sh b/download_objects.sh deleted file mode 100755 index 47685508..00000000 --- a/download_objects.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# Restore binary files (temporary fix - should use git-fat instead) -rsync -a https://vchess.club/images/pieces/Eightpieces/tmp_png/ client/public/images/pieces/Eightpieces/tmp_png/ -scp https://vchess.club/sounds/newgame.flac client/public/sounds/ -scp https://vchess.club/favicon.ico client/public/ diff --git a/server/README.md b/server/README.md index 8fa26425..9adba7ad 100644 --- a/server/README.md +++ b/server/README.md @@ -1,15 +1,19 @@ # vchess-server -## Resources +Instructions to run the server locally. - - Node.js, - - Express, - - Other npm packages (see package.json), +## Requirements -## Installation (for developers) + - Node.js + npm (any recent version) + - SQLite (version 3) - 0. Install git-fat https://github.com/jedbrown/git-fat - 1. git fat init && git fat pull - 2. Execute db/\*.sql scripts to create and fill db/vchess.sqlite - 3. Rename and edit config/parameters.js.dist into parameters.js - 4. npm i && npm start +## Installation + + 1. Execute db/\*.sql scripts to create and fill db/vchess.sqlite + 2. Rename and edit config/parameters.js.dist into parameters.js + 3. npm install + +Then run with the command +``` +npm start +```