refactor: move @/ui/display/icon to twenty-ui (#4820)
Split from https://github.com/twentyhq/twenty/pull/4518 Part of https://github.com/twentyhq/twenty/issues/4766
This commit is contained in:
@ -18,7 +18,11 @@ const excludedDirectories = [
|
||||
];
|
||||
const srcPath = path.resolve('packages/twenty-ui/src');
|
||||
|
||||
const getSubDirectoryPaths = (directoryPath: string) =>
|
||||
/**
|
||||
* @param {string} directoryPath
|
||||
* @returns {string[]}
|
||||
*/
|
||||
const getSubDirectoryPaths = (directoryPath) =>
|
||||
fs
|
||||
.readdirSync(directoryPath)
|
||||
.filter(
|
||||
@ -30,12 +34,22 @@ const getSubDirectoryPaths = (directoryPath: string) =>
|
||||
)
|
||||
.map((subDirectoryName) => path.join(directoryPath, subDirectoryName));
|
||||
|
||||
const getDirectoryPathsRecursive = (directoryPath: string): string[] => [
|
||||
/**
|
||||
*
|
||||
* @param {string} directoryPath
|
||||
* @returns {string[]}
|
||||
*/
|
||||
const getDirectoryPathsRecursive = (directoryPath) => [
|
||||
directoryPath,
|
||||
...getSubDirectoryPaths(directoryPath).flatMap(getDirectoryPathsRecursive),
|
||||
];
|
||||
|
||||
const getFilesPaths = (directoryPath: string) =>
|
||||
/**
|
||||
*
|
||||
* @param {string} directoryPath
|
||||
* @returns {string[]}
|
||||
*/
|
||||
const getFilesPaths = (directoryPath) =>
|
||||
fs
|
||||
.readdirSync(directoryPath)
|
||||
.filter(
|
||||
Reference in New Issue
Block a user