Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default api => {
const PageGenerator = makePageGenerator(api);
const { paths, config } = api;
return class Generator extends api.Generator {
constructor(args, options) {
super(args, options);
const pageGeneratorOptions = {
...options,
resolved: require.resolve('umi-build-dev/lib/plugins/commands/generate/generators/page'),
};
this.pageGenerator = new PageGenerator(args, pageGeneratorOptions);
}
writing() {
this.pageGenerator.writing();
const pagePath = this.args[0].toString();