Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dxgaqgl-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李苏
dxgaqgl-vue
Commits
87793f94
Commit
87793f94
authored
Aug 23, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟新脚本
parent
d98091f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
init.js
init.js
+9
-9
No files found.
init.js
View file @
87793f94
const
fs
=
require
(
'fs'
)
const
child_process
=
require
(
'child_process'
);
let
clone
=
'
CD /Users/forwards/Dev/FrontPackage && git clone git@gitlab.gavelinfo.com:lisu/common.git
'
;
let
pull
=
'
CD /Users/forwards/Dev/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
(
'
/Users/forwards/Dev
/FrontPackage'
,
(
error
)
=>
{
fs
.
mkdir
(
'
D:/
/FrontPackage'
,
(
error
)
=>
{
if
(
error
){
if
(
error
.
code
==
'EEXIST'
){
creatCommon
()
...
...
@@ -20,23 +20,23 @@ let pull = 'CD /Users/forwards/Dev/FrontPackage && cd common && git pull';
}
})
function
creatCommon
(){
fs
.
readFile
(
'
/Users/forwards/Dev/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
成功'
)
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment