From 2acca605c487a8514d35900d5f5560a645c6e327 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Thu, 14 Dec 2023 18:11:32 +0700 Subject: [PATCH] build(typescript): modify distribution files to be generated to `dist` directory --- .eslintrc.json | 2 +- .github/workflows/test.yaml | 12 ++++++------ action.yaml | 2 +- {main => dist}/index.mjs | 0 package.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename {main => dist}/index.mjs (100%) diff --git a/.eslintrc.json b/.eslintrc.json index fe40370..ed061ad 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "root": true, - "ignorePatterns": ["main"], + "ignorePatterns": ["dist"], "extends": ["eslint:recommended", "prettier"], "parserOptions": { "ecmaVersion": 2022, diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c6325ad..dc3b818 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -66,7 +66,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -100,7 +100,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -129,7 +129,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -153,7 +153,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -177,7 +177,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -206,7 +206,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false diff --git a/action.yaml b/action.yaml index 58f21b6..463c7e6 100644 --- a/action.yaml +++ b/action.yaml @@ -52,4 +52,4 @@ outputs: value: ${{ steps.process-inputs.outputs.build-dir }} runs: using: node20 - main: main/index.mjs + main: dist/index.mjs diff --git a/main/index.mjs b/dist/index.mjs similarity index 100% rename from main/index.mjs rename to dist/index.mjs diff --git a/package.json b/package.json index cecdee9..1c331a5 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "private": true, "type": "module", "scripts": { - "build": "tsc && ncc build src/main.mjs -o main", - "format": "prettier --write . !main !README.md", + "build": "tsc && ncc build src/main.mjs -o dist", + "format": "prettier --write . !dist !README.md", "lint": "eslint --ignore-path .gitignore .", "test": "tsc && jest" },