Skip to content

Commit

Permalink
chore(t9n): move manifest file to root level. (#7134)
Browse files Browse the repository at this point in the history
**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`
  • Loading branch information
anveshmekala authored Jun 16, 2023
1 parent acebe46 commit 6191788
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 44 deletions.
6 changes: 4 additions & 2 deletions packages/calcite-components/support/generateT9nTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "\\";
Expand Down Expand Up @@ -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);
})
);

Expand All @@ -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");
})();
2 changes: 1 addition & 1 deletion packages/calcite-components/support/syncEnT9nBundles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down
41 changes: 0 additions & 41 deletions packages/calcite-components/t9nmanifest.txt

This file was deleted.

41 changes: 41 additions & 0 deletions t9nmanifest.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6191788

Please sign in to comment.