Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
M
mo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abby Cin
mo
Commits
ff8966d2
Commit
ff8966d2
authored
Jun 03, 2020
by
abbycin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo
parent
5cdd0397
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
build.js
build.js
+12
-6
manage-db.vue
frontend/src/components/manage-db.vue
+1
-1
No files found.
build.js
View file @
ff8966d2
...
@@ -313,15 +313,18 @@ function build_backend(dst) {
...
@@ -313,15 +313,18 @@ function build_backend(dst) {
}
}
function
build
()
{
function
build
()
{
let
dst
=
'mo'
;
let
d
=
new
Date
();
if
(
fs
.
existsSync
(
dst
))
{
let
base
=
`mo-
${
process
.
platform
}
-
${
d
.
getFullYear
()}
-
${
d
.
getMonth
()
+
1
}
-
${
d
.
getDate
()}
-
${
d
.
getHours
()}${
d
.
getMinutes
()}${
d
.
getSeconds
()}
`
;
rm
(
dst
);
let
dir
=
'mo'
;
let
dst
=
path
.
join
(
dir
,
base
);
if
(
fs
.
existsSync
(
dir
))
{
rm
(
dir
);
}
}
fs
.
mkdirSync
(
dst
);
fs
.
mkdirSync
(
dst
,
{
recursive
:
true
}
);
build_frontend
(
dst
);
build_frontend
(
dst
);
build_backend
(
dst
);
build_backend
(
dst
);
let
out
=
`
${
dst
}
.zip`
;
let
out
=
`
${
base
}
.zip`
;
if
(
fs
.
existsSync
(
out
))
{
if
(
fs
.
existsSync
(
out
))
{
fs
.
unlinkSync
(
out
);
fs
.
unlinkSync
(
out
);
}
}
...
@@ -330,9 +333,12 @@ function build() {
...
@@ -330,9 +333,12 @@ function build() {
let
archive
=
archiver
(
'zip'
,
{
let
archive
=
archiver
(
'zip'
,
{
zlib
:
{
level
:
9
}
zlib
:
{
level
:
9
}
});
});
zip
.
on
(
'close'
,
()
=>
{
rm
(
dir
);
});
archive
.
pipe
(
zip
);
archive
.
pipe
(
zip
);
archive
.
on
(
'error'
,
err
=>
{
throw
err
;
});
archive
.
on
(
'error'
,
err
=>
{
throw
err
;
});
archive
.
directory
(
dst
,
dst
);
archive
.
directory
(
dst
,
base
);
archive
.
finalize
();
archive
.
finalize
();
}
}
...
...
frontend/src/components/manage-db.vue
View file @
ff8966d2
...
@@ -271,7 +271,7 @@ export default {
...
@@ -271,7 +271,7 @@ export default {
this
.
orgData
.
push
(
v
);
this
.
orgData
.
push
(
v
);
}
}
this
.
refresh
();
this
.
refresh
();
this
.
$message
.
info
(
"所
以
更改提交成功"
);
this
.
$message
.
info
(
"所
有
更改提交成功"
);
},
},
err
=>
{
err
=>
{
this
.
$message
.
error
(
`error:
${
err
}
`
);
this
.
$message
.
error
(
`error:
${
err
}
`
);
...
...
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