From 70fe698c22e814a2043be91d7fe18a679fc1d69c Mon Sep 17 00:00:00 2001 From: Hamcha Date: Fri, 20 Sep 2019 14:41:24 +0000 Subject: [PATCH] Update README and fix linting issues (#37) Solves #16 --- .drone.yml | 20 ++++++++++++ .eslintrc.js | 4 +-- README.md | 52 ++++++++++++++++++++++++++++++ src/components/Cards/CardImage.vue | 3 +- src/mlpccg/draft/session.ts | 20 ++++++------ src/mlpccg/images.ts | 3 +- src/tests/unit/.eslintrc.js | 2 +- src/tests/unit/draft.spec.ts | 2 +- 8 files changed, 88 insertions(+), 18 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5a02eee..7e5f4cb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,4 @@ +--- kind: pipeline name: default @@ -14,11 +15,19 @@ steps: - name: dependencies image: node + failure: ignore commands: - yarn depends_on: - restore-cache + - name: lint + image: node + commands: + - yarn lint + depends_on: + - dependencies + - name: build_versioned image: node commands: @@ -165,6 +174,7 @@ steps: - name: rebuild-cache image: drillster/drone-volume-cache + failure: ignore volumes: - name: cache path: /cache @@ -174,3 +184,13 @@ steps: - ./node_modules depends_on: - dependencies + +volumes: + - name: cache + host: + path: /opt/gitea/drone-cache/mcg/mlpcardgame +--- +kind: signature +hmac: 6aee8b5c1125f8f2fe31f5e927f8007084b0226979e27825336191bf76275fa3 + +... diff --git a/.eslintrc.js b/.eslintrc.js index fb644c6..3b46228 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -18,9 +18,7 @@ module.exports = { overrides: [ { - files: [ - '**/__tests__/*.{j,t}s?(x)' - ], + files: ["**/__tests__/*.{j,t}s?(x)"], env: { jest: true } diff --git a/README.md b/README.md index e329a77..5f23b3d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,58 @@ Work in progress name, work in progress game +Try the latest build here: [mcg-builds.zyg.ovh/latest](https://mcg-builds.zyg.ovh/latest/) + +## Development + +### Dependencies + +Fetch dependencies with `yarn`: + +```sh +yarn --dev +``` + +### Run local server for development + +Run this command: + +```sh +yarn serve +``` + +then visit [localhost:8080](http://localhost:8080) (URL might be different if something is already listening on port 8080) + +### Run tests + +Run unit tests with Jest: + +```sh +yarn test:unit +``` + +Generate a coverage profile with: + +```sh +yarn test:unit --coverage +``` + +### Lint code + +Before you submit a PR, make sure the code is formatted correctly with: + +```sh +yarn lint +``` + +## Building for release + +### Build + +```sh +yarn build +``` + ## License Code is ISC, Assets "depends", some stuff is taken from FreeSound and DeviantArt so your best bet is to just praise the copyright gods. diff --git a/src/components/Cards/CardImage.vue b/src/components/Cards/CardImage.vue index ef14af9..809aa8b 100644 --- a/src/components/Cards/CardImage.vue +++ b/src/components/Cards/CardImage.vue @@ -2,8 +2,7 @@ - +