From 46389a7b776b7f173cf015b93ccf47b5fbf6f236 Mon Sep 17 00:00:00 2001 From: garronej Date: Tue, 21 Mar 2023 15:30:41 +0100 Subject: [PATCH] Move scripts outside of src --- README.md | 2 +- package.json | 3 +-- {src/scripts => scripts}/link-in-app.ts | 0 tsconfig.json | 3 +-- 4 files changed, 3 insertions(+), 5 deletions(-) rename {src/scripts => scripts}/link-in-app.ts (100%) diff --git a/README.md b/README.md index 85b29db..4c03676 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ If you want to release for both CJS and ESM, it's a bit less straign forward. Yo ## Can I use `npm` (or something else) instead of `yarn` Yes, just remove the `yarn.lock` file and edit `.github/workflows/ci.yaml`, replace all `yarn ***` by `npm run ****`. -Note however that the the script (`src/link-in-app.ts`) that enable you to test in an external app will no longer work. +Note however that the the script (`scripts/link-in-app.ts`) that enable you to test in an external app will no longer work. ## What will be included in the npm bundle? diff --git a/package.json b/package.json index 217379b..e8f7b42 100755 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "_format": "prettier '**/*.{ts,tsx,json,md}'", "format": "npm run _format -- --write", "format:check": "npm run _format -- --list-different", - "link-in-app": "ts-node --skipProject src/scripts/link-in-app.ts" + "link-in-app": "ts-node --skipProject scripts/link-in-app.ts" }, "lint-staged": { "*.{ts,tsx}": [ @@ -36,7 +36,6 @@ "files": [ "src/", "!src/test/", - "!src/scripts", "dist/", "!dist/test/", "!dist/tsconfig.tsbuildinfo" diff --git a/src/scripts/link-in-app.ts b/scripts/link-in-app.ts similarity index 100% rename from src/scripts/link-in-app.ts rename to scripts/link-in-app.ts diff --git a/tsconfig.json b/tsconfig.json index 87d2581..708cd3a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,5 @@ "jsx": "react-jsx", "noFallthroughCasesInSwitch": true }, - "include": ["src"], - "exclude": ["src/scripts"] + "include": ["src"] }