diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..708a691 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,81 @@ +kind: pipeline +type: docker + +workspace: + path: /drone/svelte-sharg + +# Check if the game builds +# If yes, test if everything is nice +# If yes, deploy to vercel + +steps: + - name: install + image: node + commands: + - yarn + - name: build-game + image: node + commands: + - yarn build:game + depends_on: + - install + - name: build-pwa + image: node + commands: + - yarn build:pwa + depends_on: + - install + - name: prettier + image: node + commands: + - yarn lint:prettier:all + depends_on: + - build-game + - build-pwa + - name: eslint + image: node + commands: + - yarn lint:eslint --max-warnings=0 + depends_on: + - build-game + - build-pwa + - name: type-check + image: node + commands: + - yarn type-check + depends_on: + - build-game + - build-pwa + - name: deploy (production) + image: dockette/vercel + environment: + VERCEL_TOKEN: + from_secret: VERCEL_TOKEN + VERCEL_SCOPE: + from_secret: VERCEL_SCOPE + commands: + - vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c + when: + branch: + - main + depends_on: + - prettier + - eslint + - type-check + - name: deploy (preview) + image: dockette/vercel + environment: + VERCEL_TOKEN: + from_secret: VERCEL_TOKEN + VERCEL_SCOPE: + from_secret: VERCEL_SCOPE + commands: + - vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c + when: + branch: + exclude: + - main + depends_on: + - prettier + - eslint + - type-check diff --git a/.gitignore b/.gitignore index affbdc8..6264d31 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules/ /public/build/ /public/service-worker.js +.vercel diff --git a/package.json b/package.json index 2f74e74..4555ec6 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "dev:pwa": "yarn build:pwa -w", "start": "sirv public --no-clear", "preview": "yarn build && yarn start", - "check": "yarn check:game && yarn check:pwa", - "check:game": "svelte-check --tsconfig ./tsconfig.json", - "check:pwa": "svelte-check --tsconfig ./src/pwa/tsconfig.json", + "type-check": "yarn type-check:game && yarn type-check:pwa", + "type-check:game": "svelte-check --tsconfig ./tsconfig.json", + "type-check:pwa": "svelte-check --tsconfig ./src/pwa/tsconfig.json", "lint": "yarn lint:prettier && yarn lint:eslint", "lint:prettier": "pretty-quick --ignore-path .gitignore --check --plugin-search-dir=. .", "lint:prettier:all": "prettier --ignore-path .gitignore --check --plugin-search-dir=. .", @@ -24,7 +24,7 @@ "fix:prettier": "pretty-quick --ignore-path .gitignore --write --plugin-search-dir=. .", "fix:prettier:all": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .", "fix:eslint": "eslint --fix --ignore-path .gitignore ./src/", - "test": "yarn lint:prettier:all && yarn lint:eslint --max-warnings=0 && yarn check" + "test": "yarn lint:prettier:all && yarn lint:eslint --max-warnings=0 && yarn type-check" }, "devDependencies": { "@rollup/plugin-node-resolve": "^13.0.5", diff --git a/public/manifest.json b/public/manifest.json index c7828ed..48f6f72 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -53,4 +53,4 @@ "display": "standalone", "background_color": "#536892", "theme_color": "#2e4372" -} \ No newline at end of file +} diff --git a/pwa.rollup.config.mjs b/pwa.rollup.config.mjs index 27ba2a0..cabae7b 100644 --- a/pwa.rollup.config.mjs +++ b/pwa.rollup.config.mjs @@ -10,10 +10,7 @@ export default { preferConst: true, strict: true, }, - plugins: [ - typescript({ sourceMap: false, include: "**/service-worker.ts", lib: ["WebWorker"] }), - production && terser({ output: { comments: false } }), - ], + plugins: [typescript({ tsconfig: "src/pwa/tsconfig.json" }), production && terser({ output: { comments: false } })], watch: { clearScreen: false, }, diff --git a/src/components/ResourceTable/ResourceGroup.svelte b/src/components/ResourceTable/ResourceGroup.svelte index d886e73..ca2a6c2 100644 --- a/src/components/ResourceTable/ResourceGroup.svelte +++ b/src/components/ResourceTable/ResourceGroup.svelte @@ -1,8 +1,6 @@