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

初始化

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