Commit ff8966d2 authored by abbycin's avatar abbycin

fix typo

parent 5cdd0397
......@@ -313,15 +313,18 @@ function build_backend(dst) {
}
function build() {
let dst = 'mo';
if(fs.existsSync(dst)) {
rm(dst);
let d = new Date();
let base = `mo-${process.platform}-${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}-${d.getHours()}${d.getMinutes()}${d.getSeconds()}`;
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_backend(dst);
let out = `${dst}.zip`;
let out = `${base}.zip`;
if(fs.existsSync(out)) {
fs.unlinkSync(out);
}
......@@ -330,9 +333,12 @@ function build() {
let archive = archiver('zip', {
zlib: {level: 9}
});
zip.on('close', () => {
rm(dir);
});
archive.pipe(zip);
archive.on('error', err => { throw err; });
archive.directory(dst, dst);
archive.directory(dst, base);
archive.finalize();
}
......
......@@ -271,7 +271,7 @@ export default {
this.orgData.push(v);
}
this.refresh();
this.$message.info("所更改提交成功");
this.$message.info("所更改提交成功");
},
err => {
this.$message.error(`error: ${err}`);
......
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