From f317508d1b8665a59c5401e0b6eb90d2ce657381 Mon Sep 17 00:00:00 2001 From: felipeog <17603069+felipeog@users.noreply.github.com> Date: Thu, 5 Oct 2023 19:56:02 -0300 Subject: [PATCH] Move consts --- .gitignore | 1 - {shared => scripts}/consts/sharedFolderPath.ts | 0 scripts/downloadTargetsImages.ts | 2 +- scripts/generateEmptyTargets.ts | 2 +- scripts/generateTargetsExport.ts | 2 +- scripts/scrapeTargetsInformation.ts | 2 +- shared/consts/solvedTargets.ts | 7 ------- src/App.tsx | 2 +- src/components/Card/index.tsx | 2 +- src/components/List/index.tsx | 2 +- {shared => src}/consts/targetDimensions.ts | 0 {shared => src}/consts/targetsMap.ts | 0 12 files changed, 7 insertions(+), 15 deletions(-) rename {shared => scripts}/consts/sharedFolderPath.ts (100%) delete mode 100644 shared/consts/solvedTargets.ts rename {shared => src}/consts/targetDimensions.ts (100%) rename {shared => src}/consts/targetsMap.ts (100%) diff --git a/.gitignore b/.gitignore index 803154d..64ef1ef 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ dist node_modules .DS_Store .parcel-cache -.env diff --git a/shared/consts/sharedFolderPath.ts b/scripts/consts/sharedFolderPath.ts similarity index 100% rename from shared/consts/sharedFolderPath.ts rename to scripts/consts/sharedFolderPath.ts diff --git a/scripts/downloadTargetsImages.ts b/scripts/downloadTargetsImages.ts index 94baacd..0448963 100644 --- a/scripts/downloadTargetsImages.ts +++ b/scripts/downloadTargetsImages.ts @@ -2,7 +2,7 @@ import * as fs from 'fs' import axios from 'axios' import { createFolder } from 'scripts/utils/createFolder' -import { SHARED_FOLDER_PATH } from 'shared/consts/sharedFolderPath' +import { SHARED_FOLDER_PATH } from 'scripts/consts/sharedFolderPath' import * as targets from 'shared/targetsInfo.json' const targetsImagesFolderPath = `${SHARED_FOLDER_PATH}/targetsImages` diff --git a/scripts/generateEmptyTargets.ts b/scripts/generateEmptyTargets.ts index 11694e2..f3c2446 100644 --- a/scripts/generateEmptyTargets.ts +++ b/scripts/generateEmptyTargets.ts @@ -2,7 +2,7 @@ import * as fs from 'fs' import { createFolder } from './utils/createFolder' import * as targets from 'shared/targetsInfo.json' -import { SHARED_FOLDER_PATH } from 'shared/consts/sharedFolderPath' +import { SHARED_FOLDER_PATH } from 'scripts/consts/sharedFolderPath' export type TargetInfo = { id: number diff --git a/scripts/generateTargetsExport.ts b/scripts/generateTargetsExport.ts index 4fce322..631379c 100644 --- a/scripts/generateTargetsExport.ts +++ b/scripts/generateTargetsExport.ts @@ -1,5 +1,5 @@ import * as fs from 'fs' -import { SHARED_FOLDER_PATH } from 'shared/consts/sharedFolderPath' +import { SHARED_FOLDER_PATH } from 'scripts/consts/sharedFolderPath' const targetsFolderPath = `${SHARED_FOLDER_PATH}/targets` const targetsExportFilePath = `${targetsFolderPath}/index.ts` diff --git a/scripts/scrapeTargetsInformation.ts b/scripts/scrapeTargetsInformation.ts index 213ae08..2eb0a0a 100644 --- a/scripts/scrapeTargetsInformation.ts +++ b/scripts/scrapeTargetsInformation.ts @@ -1,6 +1,6 @@ import * as fs from 'fs' -import { SHARED_FOLDER_PATH } from 'shared/consts/sharedFolderPath' +import { SHARED_FOLDER_PATH } from 'scripts/consts/sharedFolderPath' type Target = { id: number diff --git a/shared/consts/solvedTargets.ts b/shared/consts/solvedTargets.ts deleted file mode 100644 index 55cd521..0000000 --- a/shared/consts/solvedTargets.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { TARGETS_MAP } from 'shared/consts/targetsMap' - -const allTargets = Object.values(TARGETS_MAP) - -export const SOLVED_TARGETS = allTargets.filter((target) => - Boolean(target.solution), -) diff --git a/src/App.tsx b/src/App.tsx index 91e4731..aaab5c4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import { TARGETS_MAP } from 'shared/consts/targetsMap' +import { TARGETS_MAP } from 'src/consts/targetsMap' import { GitHubButton } from './components/GitHubButton' import { List } from './components/List' diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx index 00370bd..5b4e1dc 100644 --- a/src/components/Card/index.tsx +++ b/src/components/Card/index.tsx @@ -1,7 +1,7 @@ import { HTMLAttributes } from 'react' import { Target } from 'shared/types' -import { TARGET_DIMENSIONS } from 'shared/consts/targetDimensions' +import { TARGET_DIMENSIONS } from 'src/consts/targetDimensions' import { IFrame } from '../IFrame' import * as styles from './index.module.css' diff --git a/src/components/List/index.tsx b/src/components/List/index.tsx index 32028c4..76579a9 100644 --- a/src/components/List/index.tsx +++ b/src/components/List/index.tsx @@ -2,7 +2,7 @@ import { HTMLAttributes, useEffect, useRef, useState } from 'react' import classNames from 'classnames' import { Target } from 'shared/types' -import { TARGET_DIMENSIONS } from 'shared/consts/targetDimensions' +import { TARGET_DIMENSIONS } from 'src/consts/targetDimensions' import { Card } from '../Card' import { EmptyCard } from '../EmptyCard' import * as styles from './index.module.css' diff --git a/shared/consts/targetDimensions.ts b/src/consts/targetDimensions.ts similarity index 100% rename from shared/consts/targetDimensions.ts rename to src/consts/targetDimensions.ts diff --git a/shared/consts/targetsMap.ts b/src/consts/targetsMap.ts similarity index 100% rename from shared/consts/targetsMap.ts rename to src/consts/targetsMap.ts