Skip to content

Commit

Permalink
Fix for discrepancy in file location
Browse files Browse the repository at this point in the history
  • Loading branch information
MLoughry committed Feb 20, 2024
1 parent c1690bc commit 607d9af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions packages/react-icons/addRexportsToIndex.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = function addRexportsToIndex(indexContents) {
indexContents.push('export { FluentIconsProps } from \'./utils/FluentIconsProps.types\'');
indexContents.push('export { default as wrapIcon } from \'./utils/wrapIcon\'');
indexContents.push('export { default as bundleIcon } from \'./utils/bundleIcon\'');
indexContents.push('export { createFluentIcon } from \'./utils/createFluentIcon\'');
indexContents.push('export { createFluentFontIcon } from \'../utils/fonts/createFluentFontIcon\'');
indexContents.push('export type { FluentIcon } from \'./utils/createFluentIcon\'');
indexContents.push('export * from \'./utils/useIconState\'');
indexContents.push('export * from \'./utils/constants\'');
indexContents.push('export { IconDirectionContextProvider, useIconContext } from \'./contexts/index\'');
indexContents.push('export type { IconDirectionContextValue } from \'./contexts/index\'');
module.exports = function addRexportsToIndex(indexContents, rootPath = `.`) {
indexContents.push(`export { FluentIconsProps } from \'${rootPath}/utils/FluentIconsProps.types\'`);
indexContents.push(`export { default as wrapIcon } from \'${rootPath}/utils/wrapIcon\'`);
indexContents.push(`export { default as bundleIcon } from \'${rootPath}/utils/bundleIcon\'`);
indexContents.push(`export { createFluentIcon } from \'${rootPath}/utils/createFluentIcon\'`);
indexContents.push(`export { createFluentFontIcon } from \'${rootPath}./utils/fonts/createFluentFontIcon\'`);
indexContents.push(`export type { FluentIcon } from \'${rootPath}/utils/createFluentIcon\'`);
indexContents.push(`export * from \'${rootPath}/utils/useIconState\'`);
indexContents.push(`export * from \'${rootPath}/utils/constants\'`);
indexContents.push(`export { IconDirectionContextProvider, useIconContext } from \'${rootPath}/contexts/index\'`);
indexContents.push(`export type { IconDirectionContextValue } from \'${rootPath}/contexts/index\'`);
}
2 changes: 1 addition & 1 deletion packages/react-icons/convert-font.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async function processFiles(src, dest) {

const indexPath = path.join(dest, 'index.tsx')
// Finally add the interface definition and then write out the index.
addRexportsToIndex(indexContents);
addRexportsToIndex(indexContents, '..');


await fs.writeFile(indexPath, indexContents.join('\n'));
Expand Down

0 comments on commit 607d9af

Please sign in to comment.