import fs from "fs";
import path from "path";
/**
 * Retrieves all component names from the tokens/components directory.
 * This function reads the contents of the given directory and filters out only the directories,
 * assuming each directory represents a component.
 *
 * @returns {string[]} - An array of component names (folder names).
 */
const getComponentNames = (directory) => {
    return fs
        .readdirSync(directory)
        .filter((file) => fs.statSync(path.join(directory, file)).isDirectory()); // Only include directories
};
/**
 * Extracts the base file name (excluding extension) from a token's file path.
 *
 * @param {string} filePath - The full path of the token file.
 * @returns {string} - The base file name without its extension.
 */
const getBaseFileName = (filePath) => {
    return path.basename(filePath, path.extname(filePath));
};
export { getBaseFileName, getComponentNames };
//# sourceMappingURL=utils.js.map