codizium-cli
Version:
A CLI tool to scaffold Laravel and Node-based modules with ease.
16 lines (12 loc) • 356 B
JavaScript
const { detectProjectType } = require("./detect");
const path = require("path");
function loadGenerator(basePath) {
const type = detectProjectType(basePath);
try {
return require(`./generators/${type}.js`);
} catch (e) {
console.error(`❌ No generator found for '${type}'`);
process.exit(1);
}
}
module.exports = { loadGenerator };