in packages/build-tools/console-toolkit-plugin-xconsole-fs-route/src/index.ts [54:71]
function getRouteMetaFromDir(api: PluginAPI, options: PluginOptions) {
const tmpPath = resolve(api.getCwd(), `src/${TMP_DIR}`);
const directory = resolve(api.getCwd(), 'src/pages');
const [routes, globalRoutes] = getRouteMeta(directory, tmpPath);
const global = getGlobalMeta(api.getCwd(), {
indexRoute: `${get(options, 'routes.index', null)}`,
mode: `${get(options, 'routes.mode', '')}`,
prefix: `${get(options, 'routes.prefix', '')}`,
appId: options.appId,
});
return {
routes,
globalRoutes,
global
};
}