Commit 687a8684 authored by 李苏's avatar 李苏 💬

初始化

parent 121041ff
const fs = require('fs')
const child_process = require('child_process');
let clone = 'D: && CD D://FrontPackage && git clone git@gitlab.gavelinfo.com:lisu/common.git ';
let pull = 'D: && CD D://FrontPackage && cd common && git pull ';
let clone = 'D: && CD D://FrontPackage && git clone git@gitlab.gavelinfo.com:gavelinfo/frontpackage.git';
let pull = 'D: && CD D://FrontPackage && cd frontpackage && git pull ';
fs.readFile('./README.md','utf-8',(err,data)=>{
console.log(data||'Loading')
console.table(global.process.versions)
console.log('\x1B[33m%s','>正在读取项目必须依赖common包')
console.log('\x1B[33m%s','>正在读取项目依赖frontpackage包')
})
fs.mkdir('D://FrontPackage', (error) => {
if(error){
......@@ -20,23 +20,23 @@ let pull = 'D: && CD D://FrontPackage && cd common && git pull ';
}
})
function creatCommon(){
fs.readFile('D:/FrontPackage/common/index.js','utf-8',(err,data)=>{
fs.readFile('D:/FrontPackage/frontpackage/index.js','utf-8',(err,data)=>{
if(data){
console.log('\x1B[33m%s','>正在拉取最新commom包')
console.log('\x1B[33m%s','>正在拉取最新frontpackage包')
child_process.exec(pull,(err,s1,s2)=>{
if(err){
console.log(err)
}else{
console.log('\x1B[33m%s','>拉取common成功')
console.log('\x1B[33m%s','>拉取frontpackage成功')
}
});
}else{
console.log('\x1B[33m%s','>common读取失败,正在创建common包,请等待.....')
console.log('\x1B[33m%s','>frontpackage读取失败,正在创建frontpackage包,请等待.....')
child_process.exec(clone,(err,s1,s2)=>{
if(err){
console.log('操作报错',err,s1,s2)
}else{
console.log('\x1B[33m%s','>创建common成功')
console.log('\x1B[33m%s','>创建frontpackage成功')
}
});
}
......
......@@ -42,7 +42,7 @@
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0",
"clipboard": "2.0.8",
"common": "file:D://FrontPackage/common",
"common": "file:../frontpackage",
"core-js": "3.19.1",
"echarts": "^4.9.0",
"element-ui": "2.15.8",
......@@ -66,7 +66,8 @@
"vue-seamless-scroll": "^1.1.23",
"vue-video-player": "5.0",
"vuedraggable": "^2.24.3",
"vuex": "3.6.0"
"vuex": "3.6.0",
"webpackbar": "^6.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.6",
......@@ -95,9 +96,6 @@
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment