jenkins测试
This commit is contained in:
24
bin/sync.js
24
bin/sync.js
@@ -29,7 +29,7 @@ const getFileInfo = (app, file) => {
|
|||||||
name,
|
name,
|
||||||
label,
|
label,
|
||||||
path,
|
path,
|
||||||
libPath: file.replace(/\\/g, '/').replace(/^src(\/.+)\.vue/, '$1'),
|
libPath: file.replace(/\\\//g, '/').replace(/^src(\/.+)\.vue/, '$1'),
|
||||||
type: 'wxwork'
|
type: 'wxwork'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -37,28 +37,28 @@ const getFileInfo = (app, file) => {
|
|||||||
const start = () => {
|
const start = () => {
|
||||||
chalkTag.info('开始同步数据到数据库')
|
chalkTag.info('开始同步数据到数据库')
|
||||||
Promise.all([
|
Promise.all([
|
||||||
findPages('../src/components/pages', file => {
|
findPages('src/components/pages', file => {
|
||||||
if (/.+\\[^\\]+\\[^\\]+\.vue/g.test(file)) {
|
if (/.+\\\/[^\\\/]+\\\/[^\\\/]+\.vue/g.test(file)) {
|
||||||
let app = {
|
let app = {
|
||||||
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
|
path: file.replace(/^src\\\/(.*).vue/g, '$1').replace(/\\\//g, '/')
|
||||||
}
|
}
|
||||||
return getFileInfo(app, file)
|
return getFileInfo(app, file)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
findPages('../src/apps', file => {
|
findPages('src/apps', file => {
|
||||||
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
|
if (/.+\\\/App[^\\\/]+\\\/[^\\\/]+\.vue/g.test(file)) {
|
||||||
let app = {
|
let app = {
|
||||||
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
|
name: file.replace(/.*\\\/([^\\\/]+).vue/g, '$1'),
|
||||||
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
|
path: file.replace(/^src\\\/(.*).vue/g, '$1').replace(/\\\//g, '/')
|
||||||
}
|
}
|
||||||
return getFileInfo(app, file)
|
return getFileInfo(app, file)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
findPages('../src/project', file => {
|
findPages('src/project', file => {
|
||||||
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
|
if (/.+\\\/App[^\\\/]+\\\/[^\\\/]+\.vue/g.test(file)) {
|
||||||
let app = {
|
let app = {
|
||||||
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
|
name: file.replace(/.*\\\/([^\\\/]+).vue/g, '$1'),
|
||||||
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
|
path: file.replace(/^src\\\/(.*).vue/g, '$1').replace(/\\\//g, '/')
|
||||||
}
|
}
|
||||||
return getFileInfo(app, file)
|
return getFileInfo(app, file)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user