From a844cd86a73c4b8fbcc5b656469b589ab954e989 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 22 Jun 2023 10:01:34 +0100 Subject: [PATCH] fix: copy public files --- package.json | 9 ++++++--- src/features/ScreenTimeDialog.tsx | 2 +- src/{ => public}/images/brain.svg | 0 3 files changed, 7 insertions(+), 4 deletions(-) rename src/{ => public}/images/brain.svg (100%) diff --git a/package.json b/package.json index 0100dfbe..2f84ea0e 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,12 @@ "scripts": { "lint": "eslint src", "test": "echo \"Error: no test specified\" && exit 1", - "build": "rm -rf lib && npm run build:esm && npm run build:cjs", + "build": "rm -rf lib && npm run build:esm && npm run build:cjs && npm run copy", "build:esm": "tsc", - "build:cjs": "tsc --module commonjs --outDir lib/cjs" + "build:cjs": "tsc --module commonjs --outDir lib/cjs", + "copy": "npm run copy:esm && npm run copy:cjs", + "copy:esm": "cp -r src/public lib/esm/public", + "copy:cjs": "cp -r src/public lib/cjs/public" }, "repository": { "type": "git", @@ -83,4 +86,4 @@ "formik": "^2.2.9", "yup": "^1.1.1" } -} +} \ No newline at end of file diff --git a/src/features/ScreenTimeDialog.tsx b/src/features/ScreenTimeDialog.tsx index 8b9f7f38..5c8a2083 100644 --- a/src/features/ScreenTimeDialog.tsx +++ b/src/features/ScreenTimeDialog.tsx @@ -6,7 +6,7 @@ import { } from '@mui/material'; import { Image } from '../components'; -import BrainImage from '../images/brain.svg'; +import BrainImage from '../public/images/brain.svg'; export interface ScreenTimeDialogProps { open: boolean; diff --git a/src/images/brain.svg b/src/public/images/brain.svg similarity index 100% rename from src/images/brain.svg rename to src/public/images/brain.svg