@react-gnome/core
Version:
## Getting Started
21 lines (20 loc) • 619 B
JavaScript
// src/utils/get-runtime-init.ts
import fs from "fs";
import path from "path";
import { getDirPath } from "../get-dirpath/get-dirpath.mjs";
var ALLOWED_EXTENSIONS = [".ts", ".js", ".mjs", ".cjs"];
function getRuntimeInitImportPaths(program) {
const rootPath = getDirPath();
const files = fs.readdirSync(path.join(rootPath, "runtime/esm"));
const modules = [];
for (const filename of files) {
const ext = path.extname(filename);
if (ALLOWED_EXTENSIONS.includes(ext)) {
modules.push("@react-gnome/core/runtime/esm/" + filename);
}
}
return modules;
}
export {
getRuntimeInitImportPaths
};