Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (config.paths && config.paths.environment) {
const paths = config.paths.environment;
if (paths.global) env.paths.global = paths.global;
if (paths.component) env.paths.component = paths.component;
}
debug("Set env as", args.env);
}
// Require external modules
for (const id of config.require) {
await localRequire(id, args.cwd);
}
// Generate manifests
const result = await generate({
path: join(args.cwd, "components"),
components: config.components,
extensions: config.extensions,
validate: args.validate
});
if (!result.manifests.length) {
throw new CLIError("No manifests are exported from components", {
output: `No manifests are exported from components. Make sure there are exported manifests in components.`
});
}
return result;
}