From 6191788a639be9546480d3e2e2900936e8f326ee Mon Sep 17 00:00:00 2001 From: Anveshreddy mekala Date: Fri, 16 Jun 2023 15:18:12 -0500 Subject: [PATCH] chore(t9n): move manifest file to root level. (#7134) **Related Issue:** # ## Summary This PR will move the `t9nmanifest.txt` file from `packages/calcite-components/support` to the root directory as requested by the t9n team and updates the paths in `t9nmanifest.txt` --- .../support/generateT9nTypes.ts | 6 ++- .../support/syncEnT9nBundles.ts | 2 +- packages/calcite-components/t9nmanifest.txt | 41 ------------------- t9nmanifest.txt | 41 +++++++++++++++++++ 4 files changed, 46 insertions(+), 44 deletions(-) delete mode 100644 packages/calcite-components/t9nmanifest.txt create mode 100644 t9nmanifest.txt diff --git a/packages/calcite-components/support/generateT9nTypes.ts b/packages/calcite-components/support/generateT9nTypes.ts index 2d92fa4e77f..098cd7eee47 100644 --- a/packages/calcite-components/support/generateT9nTypes.ts +++ b/packages/calcite-components/support/generateT9nTypes.ts @@ -9,6 +9,7 @@ import { InputData, jsonInputForTargetLanguage, quicktype } from "quicktype-core const rootBundleFile = "messages.json"; const rootBundlePattern = `src/components/**/t9n/${rootBundleFile}`; + const rootManifestFilePath = "packages/calcite-components/"; const rootBundles = await globby([rootBundlePattern]); const manifestFilePathSeparator = "\\"; @@ -53,7 +54,8 @@ import { InputData, jsonInputForTargetLanguage, quicktype } from "quicktype-core }) ); const t9nPath = `${bundle.split("/t9n")[0]}/t9n`; - return t9nPath.replace(/\//g, manifestFilePathSeparator); + const relativeT9nPathh = `${rootManifestFilePath}${t9nPath}`; + return relativeT9nPathh.replace(/\//g, manifestFilePathSeparator); }) ); @@ -67,6 +69,6 @@ import { InputData, jsonInputForTargetLanguage, quicktype } from "quicktype-core return componentAName.localeCompare(componentBName); }) .join("\n"); - await writeFile("t9nmanifest.txt", manifestFileContents); + await writeFile("../../t9nmanifest.txt", manifestFileContents); console.log("finished writing manifest"); })(); diff --git a/packages/calcite-components/support/syncEnT9nBundles.ts b/packages/calcite-components/support/syncEnT9nBundles.ts index 279c183493a..2c339c0c7eb 100644 --- a/packages/calcite-components/support/syncEnT9nBundles.ts +++ b/packages/calcite-components/support/syncEnT9nBundles.ts @@ -4,7 +4,7 @@ } = await import("fs"); const { resolve, sep, win32 } = await import("path"); - const t9nManifestPath = "./t9nmanifest.txt"; + const t9nManifestPath = "../../t9nmanifest.txt"; const contents = await readFile(t9nManifestPath, { encoding: "utf-8" }); const entries = contents.split("\n"); const synchronized: string[] = []; diff --git a/packages/calcite-components/t9nmanifest.txt b/packages/calcite-components/t9nmanifest.txt deleted file mode 100644 index 8412835b080..00000000000 --- a/packages/calcite-components/t9nmanifest.txt +++ /dev/null @@ -1,41 +0,0 @@ -src\components\action\assets\action\t9n -src\components\action-bar\assets\action-bar\t9n -src\components\action-group\assets\action-group\t9n -src\components\action-pad\assets\action-pad\t9n -src\components\alert\assets\alert\t9n -src\components\block\assets\block\t9n -src\components\block-section\assets\block-section\t9n -src\components\button\assets\button\t9n -src\components\card\assets\card\t9n -src\components\chip\assets\chip\t9n -src\components\color-picker\assets\color-picker\t9n -src\components\combobox\assets\combobox\t9n -src\components\date-picker\assets\date-picker\t9n -src\components\filter\assets\filter\t9n -src\components\flow-item\assets\flow-item\t9n -src\components\handle\assets\handle\t9n -src\components\inline-editable\assets\inline-editable\t9n -src\components\input\assets\input\t9n -src\components\input-date-picker\assets\input-date-picker\t9n -src\components\input-number\assets\input-number\t9n -src\components\input-text\assets\input-text\t9n -src\components\input-time-picker\assets\input-time-picker\t9n -src\components\input-time-zone\assets\input-time-zone\t9n -src\components\list-item\assets\list-item\t9n -src\components\menu\assets\menu\t9n -src\components\menu-item\assets\menu-item\t9n -src\components\modal\assets\modal\t9n -src\components\notice\assets\notice\t9n -src\components\pagination\assets\pagination\t9n -src\components\panel\assets\panel\t9n -src\components\pick-list-item\assets\pick-list-item\t9n -src\components\popover\assets\popover\t9n -src\components\rating\assets\rating\t9n -src\components\scrim\assets\scrim\t9n -src\components\shell-panel\assets\shell-panel\t9n -src\components\tab-title\assets\tab-title\t9n -src\components\text-area\assets\text-area\t9n -src\components\time-picker\assets\time-picker\t9n -src\components\tip\assets\tip\t9n -src\components\tip-manager\assets\tip-manager\t9n -src\components\value-list\assets\value-list\t9n \ No newline at end of file diff --git a/t9nmanifest.txt b/t9nmanifest.txt new file mode 100644 index 00000000000..a5f704b03b9 --- /dev/null +++ b/t9nmanifest.txt @@ -0,0 +1,41 @@ +packages\calcite-components\src\components\action\assets\action\t9n +packages\calcite-components\src\components\action-bar\assets\action-bar\t9n +packages\calcite-components\src\components\action-group\assets\action-group\t9n +packages\calcite-components\src\components\action-pad\assets\action-pad\t9n +packages\calcite-components\src\components\block\assets\block\t9n +packages\calcite-components\src\components\alert\assets\alert\t9n +packages\calcite-components\src\components\block-section\assets\block-section\t9n +packages\calcite-components\src\components\button\assets\button\t9n +packages\calcite-components\src\components\card\assets\card\t9n +packages\calcite-components\src\components\chip\assets\chip\t9n +packages\calcite-components\src\components\color-picker\assets\color-picker\t9n +packages\calcite-components\src\components\combobox\assets\combobox\t9n +packages\calcite-components\src\components\date-picker\assets\date-picker\t9n +packages\calcite-components\src\components\filter\assets\filter\t9n +packages\calcite-components\src\components\flow-item\assets\flow-item\t9n +packages\calcite-components\src\components\handle\assets\handle\t9n +packages\calcite-components\src\components\inline-editable\assets\inline-editable\t9n +packages\calcite-components\src\components\input\assets\input\t9n +packages\calcite-components\src\components\input-date-picker\assets\input-date-picker\t9n +packages\calcite-components\src\components\input-number\assets\input-number\t9n +packages\calcite-components\src\components\input-text\assets\input-text\t9n +packages\calcite-components\src\components\input-time-picker\assets\input-time-picker\t9n +packages\calcite-components\src\components\input-time-zone\assets\input-time-zone\t9n +packages\calcite-components\src\components\list-item\assets\list-item\t9n +packages\calcite-components\src\components\menu\assets\menu\t9n +packages\calcite-components\src\components\menu-item\assets\menu-item\t9n +packages\calcite-components\src\components\modal\assets\modal\t9n +packages\calcite-components\src\components\notice\assets\notice\t9n +packages\calcite-components\src\components\panel\assets\panel\t9n +packages\calcite-components\src\components\pick-list-item\assets\pick-list-item\t9n +packages\calcite-components\src\components\pagination\assets\pagination\t9n +packages\calcite-components\src\components\popover\assets\popover\t9n +packages\calcite-components\src\components\rating\assets\rating\t9n +packages\calcite-components\src\components\scrim\assets\scrim\t9n +packages\calcite-components\src\components\shell-panel\assets\shell-panel\t9n +packages\calcite-components\src\components\tab-title\assets\tab-title\t9n +packages\calcite-components\src\components\text-area\assets\text-area\t9n +packages\calcite-components\src\components\time-picker\assets\time-picker\t9n +packages\calcite-components\src\components\tip\assets\tip\t9n +packages\calcite-components\src\components\tip-manager\assets\tip-manager\t9n +packages\calcite-components\src\components\value-list\assets\value-list\t9n \ No newline at end of file