Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function generateHandler(
args: BaseGenerateArguments & Context
): Promise {
// Load config
const globalConfig = await searchConfig(args.cwd);
const config = {
...globalConfig,
...resolveConfig(globalConfig, args)
};
if (!config.components.length) {
throw new CLIError("No components are given", {
output:
"No components are given. Set components in a config file or in arguments."
});
}
// Set env
if (args.env) {
const env = await importEnv(args.cwd);