Files
netease--tango/packages/core/src/models/js-app-entry-file.ts
T
wehub-resource-sync 2d398e1894
Deploy Github Pages / deploy (push) Failing after 1s
chore: import upstream snapshot with attribution
2026-07-13 12:30:43 +08:00

19 lines
542 B
TypeScript

import { traverseEntryFile } from '../helpers';
import { IFileConfig } from '../types';
import { AbstractJsFile } from './abstract-js-file';
import { AbstractWorkspace } from './abstract-workspace';
export class JsAppEntryFile extends AbstractJsFile {
routerType: string;
constructor(workspace: AbstractWorkspace, props: IFileConfig) {
super(workspace, props, false);
this.update(props.code, true, false);
}
_analysisAst() {
const config = traverseEntryFile(this.ast);
this.routerType = config?.router?.type;
}
}