From d2e7d551b1ee01e8bf61a2c5daf99e45862db828 Mon Sep 17 00:00:00 2001 From: Leesa Ward Date: Sat, 21 Sep 2024 11:54:33 +1000 Subject: [PATCH 1/3] Add workflow for creating and publishing a release --- project-structure.json | 2 +- tsconfig.prod.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tsconfig.prod.json diff --git a/project-structure.json b/project-structure.json index e34576a..c83fa2c 100644 --- a/project-structure.json +++ b/project-structure.json @@ -225,7 +225,7 @@ "extension": ["json"] }, { - "name": "tsconfig.dist", + "name": "tsconfig.prod", "extension": ["json"] }, { diff --git a/tsconfig.prod.json b/tsconfig.prod.json new file mode 100644 index 0000000..5f955f1 --- /dev/null +++ b/tsconfig.prod.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "src" + ], + "exclude": [ + "src/**/*.test.tsx" + ], + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "declaration": true, + } +} \ No newline at end of file From e3f3a842cdacbd5e476486200aacb35d0911c18c Mon Sep 17 00:00:00 2001 From: Leesa Ward Date: Sat, 21 Sep 2024 12:02:47 +1000 Subject: [PATCH 2/3] Fix config duplication --- project-structure.json | 2 +- tsconfig.prod.json | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 tsconfig.prod.json diff --git a/project-structure.json b/project-structure.json index c83fa2c..e34576a 100644 --- a/project-structure.json +++ b/project-structure.json @@ -225,7 +225,7 @@ "extension": ["json"] }, { - "name": "tsconfig.prod", + "name": "tsconfig.dist", "extension": ["json"] }, { diff --git a/tsconfig.prod.json b/tsconfig.prod.json deleted file mode 100644 index 5f955f1..0000000 --- a/tsconfig.prod.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": [ - "src" - ], - "exclude": [ - "src/**/*.test.tsx" - ], - "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist", - "declaration": true, - } -} \ No newline at end of file From c62f3e84379044de92afad868c426d370155ccde Mon Sep 17 00:00:00 2001 From: Leesa Ward Date: Sat, 21 Sep 2024 12:06:39 +1000 Subject: [PATCH 3/3] Config fixes --- .github/workflows/release-and-publish.yaml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-and-publish.yaml b/.github/workflows/release-and-publish.yaml index cb426c5..c47fe3f 100644 --- a/.github/workflows/release-and-publish.yaml +++ b/.github/workflows/release-and-publish.yaml @@ -25,7 +25,7 @@ jobs: with: node-version: 20 - run: npm ci - - run: npm run build + - run: npm run package release: needs: build diff --git a/package.json b/package.json index e51bcbe..293501e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test:unit": "jest ./src/components/**/*.test.tsx --coverage", "storybook": "storybook dev --port 6006", "build:storybook": "storybook build", - "build": "tsc -p tsconfig.dist.json", + "build": "storybook build", "preview": "npx http-server ./storybook-static", "package": "tsc -p tsconfig.dist.json" },