mini-entry
Advanced tools
Comparing version 0.0.1 to 0.0.2
14
index.js
@@ -5,3 +5,3 @@ /* | ||
* @Last Modified by: youzhao.zhou | ||
* @Last Modified time: 2021-04-21 17:07:07 | ||
* @Last Modified time: 2021-04-21 17:26:09 | ||
* @Description 获取webpack入口 | ||
@@ -74,3 +74,3 @@ * | ||
// 解析app.json文件,获取app.json中配置的页面和组件信息 | ||
const appEntry = await parseApp(appEntryFilePath); | ||
const appEntry = parseApp(appEntryFilePath); | ||
// 解析app.json中获取到的所有json配置文件 | ||
@@ -85,3 +85,3 @@ const componentEntry = parseComponentInPageAndComponent(entryConfigPath); | ||
const result = await getAllEntry(tmpConfigFiles); | ||
const result = getAllEntry(tmpConfigFiles); | ||
@@ -115,3 +115,3 @@ return { | ||
async function parseApp(configFile) { | ||
const configData = await jsonfile.readFile(configFile); | ||
const configData = jsonfile.readFileSync(configFile); | ||
const mainPages = parsePages(configData.pages); | ||
@@ -344,3 +344,3 @@ const subPages = parseSubPages(configData.subpackages); | ||
*/ | ||
async function getEntry(options) { | ||
function getEntry(options) { | ||
entryConfigPath.clear(); | ||
@@ -351,3 +351,3 @@ hasParsedEntryConfigPath.clear(); | ||
const paths = await globby(Object.values(config.entry)); | ||
const paths = globby.sync(Object.values(config.entry)); | ||
@@ -358,3 +358,3 @@ if (paths.length === 0) { | ||
const entry = await getAllEntry(paths); | ||
const entry = getAllEntry(paths); | ||
@@ -361,0 +361,0 @@ return entry; |
{ | ||
"name": "mini-entry", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "解析小程序json", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12200