diff --git a/figma.config.json b/figma.config.json index afb702b3..00fe95ba 100644 --- a/figma.config.json +++ b/figma.config.json @@ -1,6 +1,6 @@ { "codeConnect": { - "include": ["outputs/code-connect/**/*.figma.ts"], + "include": ["outputs/code-connect.figma.ts"], "exclude": ["test/**/*.figma.ts"] } } diff --git a/outputs/code-connect.ts b/outputs/code-connect.figma.ts similarity index 100% rename from outputs/code-connect.ts rename to outputs/code-connect.figma.ts diff --git a/scripts/code-connect/generate-code-connect-file.ts b/scripts/code-connect/generate-code-connect-file.ts index 0f52cce3..54b000c5 100644 --- a/scripts/code-connect/generate-code-connect-file.ts +++ b/scripts/code-connect/generate-code-connect-file.ts @@ -20,7 +20,7 @@ export const generateCodeConnectFile = async (outputDir: string, iconManifest: I ); const codeConnectFile = await prettier.format(getNodeText(sourceFile), { parser: "typescript" }); - writeFileSync(`${outputDir}/code-connect.ts`, codeConnectFile); + writeFileSync(`${outputDir}/code-connect.figma.ts`, codeConnectFile); }; const getImportStatement = () => diff --git a/test/fetch-icons/integration/generateFontFiles.test.ts b/test/fetch-icons/integration/generateFontFiles.test.ts index 32fbe0f9..763a64c6 100644 --- a/test/fetch-icons/integration/generateFontFiles.test.ts +++ b/test/fetch-icons/integration/generateFontFiles.test.ts @@ -3,7 +3,6 @@ import "./saveSvgs.test.js"; // Ensures saveSVGs is called before running these import { assert } from "chai"; import { checkFontsExist } from "../utils.js"; import { generateFonts } from "../../../scripts/fetch-icons/generators/generateFonts.js"; -import { GenerateFontResult } from "../../../scripts/fetch-icons/types/customTypes.js"; import { optimizeSVGs } from "../../../scripts/utils/optimizeSvgs.js"; import { testIconsOutputDir, @@ -13,6 +12,7 @@ import { testTSOutputDir, } from "../../data/constants.js"; import { categoryNames, generatedFontDefinitions } from "../../data/index.js"; +import { GenerateFontResult } from "../../../scripts/types/customTypes.js"; describe("generateFontFiles", () => { let result: GenerateFontResult; diff --git a/test/fetch-icons/integration/saveSvgs.test.ts b/test/fetch-icons/integration/saveSvgs.test.ts index 68856e5c..6eee0f23 100644 --- a/test/fetch-icons/integration/saveSvgs.test.ts +++ b/test/fetch-icons/integration/saveSvgs.test.ts @@ -3,8 +3,8 @@ import { allImageFiles, categoryNames } from "../../data/index.js"; import { testIconsOutputDir } from "../../data/constants.js"; import { existsSync } from "fs"; import { assert } from "chai"; -import { ImageManifest } from "../../../scripts/fetch-icons/types/customTypes.js"; import { checkIconsExist } from "../utils.js"; +import { ImageManifest } from "../../../scripts/types/customTypes.js"; describe("saveSvgs", () => { before(async () => { diff --git a/test/fetch-icons/unit/api.test.ts b/test/fetch-icons/unit/api.test.ts index d1e10246..650dc53b 100644 --- a/test/fetch-icons/unit/api.test.ts +++ b/test/fetch-icons/unit/api.test.ts @@ -1,11 +1,11 @@ import { assert } from "chai"; -import { DocumentResponse } from "../../../scripts/fetch-icons/types/figmaTypes.js"; import { getFigmaDocument, getImageFiles } from "../../../scripts/utils/api.js"; import { testFileId } from "../../data/constants.js"; import { allImageFiles, manifest } from "../../data/index.js"; import { before } from "mocha"; import { checkFigmaTokenIsSet } from "../../../scripts/utils/figmaUtils.js"; import { ZDS_ASSETS_FILE_ID } from "../../../figmaConfig.js"; +import { DocumentResponse } from "../../../scripts/types/figmaTypes.js"; describe("api", () => { before(() => { diff --git a/test/fetch-icons/unit/fileUtils.test.ts b/test/fetch-icons/unit/fileUtils.test.ts index f2bceeed..9e234ae4 100644 --- a/test/fetch-icons/unit/fileUtils.test.ts +++ b/test/fetch-icons/unit/fileUtils.test.ts @@ -1,8 +1,8 @@ -import { FontType } from "../../../scripts/fetch-icons/types/customTypes.js"; import { clearDirectory, createFolder, getIconFileName } from "../../../scripts/utils/fileUtils.js"; import { existsSync, rmSync, writeFileSync } from "node:fs"; import { testOutputDir } from "../../data/constants.js"; import { assert } from "chai"; +import { FontType } from "../../../scripts/types/customTypes.js"; describe("fileUtils - folders", () => { const testDir = `${testOutputDir}/test`;