From 3d4723bcdd8501d191b7733a52789a2931ba0283 Mon Sep 17 00:00:00 2001 From: SilurianYang <1606726660@qq.com> Date: Thu, 12 Mar 2020 13:14:56 +0800 Subject: [PATCH] remol --- dist/uni-read-pages@1.0.0.js | 80 ------------------------------------ 1 file changed, 80 deletions(-) delete mode 100644 dist/uni-read-pages@1.0.0.js diff --git a/dist/uni-read-pages@1.0.0.js b/dist/uni-read-pages@1.0.0.js deleted file mode 100644 index 9fb797b..0000000 --- a/dist/uni-read-pages@1.0.0.js +++ /dev/null @@ -1,80 +0,0 @@ -const path = require('path') -const CONFIG={ - includes:['path','aliasPath','name'] -} -const rootPath=path.resolve(process.cwd(), 'node_modules'); -const UNI_PLATFORM=process.env.UNI_PLATFORM; -class TransformPages { - constructor(config) { - config={...CONFIG,...config}; - this.CONFIG=config; - this.webpack=require(this.resolvePath('webpack')); - this.uniPagesJSON=require(this.resolvePath('@dcloudio/uni-cli-shared/lib/pages.js')) - this.routes=this.getPagesRoutes().concat(this.getNotMpRoutes()); - } - /** - * 获取所有pages.json下的内容 返回json - */ - get pagesJson(){ - return this.uniPagesJSON.getPagesJson(); - } - /** 解析绝对路径 - * @param {Object} dir - */ - resolvePath(dir){ - return path.resolve(rootPath,dir); - } - /** - * 通过读取pages.json文件 生成直接可用的routes - */ - getPagesRoutes(pages=this.pagesJson.pages,rootPath=null){ - const routes=[]; - for(let i=0;i