From 9ec225f8728adf595dd10f4fd75dccd381929e20 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 30 Nov 2020 21:09:20 +1030 Subject: [PATCH] fix: add copy-schemas to build step --- .github/workflows/production.yml | 5 +---- package.json | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 65dd5d1d9..710fbab13 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -85,12 +85,9 @@ jobs: - name: Installing node deps run: npm install - - name: Compile typescript to js + - name: Run build run: npm run build - - name: Copy graphql files to dist - run: npm run copy-schemas - # See https://github.com/apollographql/subscriptions-transport-ws/issues/433 - name: Patch subscriptions-transport-ws run: npm run patch:subscriptions-transport-ws diff --git a/package.json b/package.json index 2c219d866..e51c773f7 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,10 @@ "author": "Alexis Tyler (https://wvvw.me/)", "license": "UNLICENSED", "scripts": { - "build": "npx tsup ./app/index.ts", + "build": "npm run bundle && npm run copy-schemas", + "bundle": "npx tsup ./app/index.ts --minify", "bundle-dependencies": "bundle-dependencies update", - "copy-schemas": "cpx app/**/*.graphql dist", + "copy-schemas": "cpx app/**/*.graphql dist/types", "clean": "modclean --no-progress --run --path .", "commit": "npx git-cz", "lint": "xo --verbose",