From 469737fdd7e9d86ed6e1617b5e514f8ddc5e27cc Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 16 Mar 2023 10:05:58 +0800 Subject: [PATCH] =?UTF-8?q?jenkins=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/sync.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/sync.js b/bin/sync.js index fa85aae7..7be66c26 100644 --- a/bin/sync.js +++ b/bin/sync.js @@ -3,10 +3,8 @@ const axios = require("axios"); let apps = {list: [], desc: "用于产品库主页面获取应用使用", type: 'wxwork'} const saveApps = app => { - console.log(app) if (app.list.length > 0) { return axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => { - console.log(res) if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...") }).catch(err => { chalkTag.error(err) @@ -14,7 +12,6 @@ const saveApps = app => { } } const getFileInfo = (app, file) => { - console.log(app, file) let vue = fs.readFileSync(file).toString() if (/appName/.test(vue)) { let appName = vue.replace(/[\s\S]*(appName:.+),[\s\S]*/gm, '$1') @@ -40,7 +37,7 @@ const getFileInfo = (app, file) => { const start = () => { chalkTag.info('开始同步数据到数据库') Promise.all([ - findPages('src/components/pages', file => { + findPages('../src/components/pages', file => { if (/.+\\[^\\]+\\[^\\]+\.vue/g.test(file)) { let app = { path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/') @@ -48,7 +45,7 @@ const start = () => { return getFileInfo(app, file) } }), - findPages('./src/apps', file => { + findPages('../src/apps', file => { if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) { let app = { name: file.replace(/.*\\([^\\]+).vue/g, '$1'), @@ -57,7 +54,7 @@ const start = () => { return getFileInfo(app, file) } }), - findPages('src/project', file => { + findPages('../src/project', file => { if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) { let app = { name: file.replace(/.*\\([^\\]+).vue/g, '$1'),