From 59d572ae18d55a3e1da83d1af7cbcde9f611ab67 Mon Sep 17 00:00:00 2001 From: wanglin <1013335014@qq.com> Date: Wed, 14 Jul 2021 08:13:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- copy.js | 6 ++---- index.html | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 index.html diff --git a/copy.js b/copy.js index d619a290..21af5829 100644 --- a/copy.js +++ b/copy.js @@ -4,13 +4,11 @@ const path = require('path') const src = path.resolve(__dirname, './dist/index.html') const dest = path.resolve(__dirname, './index.html') -const destStat = fs.statSync(dest) -if (destStat.isFile()) { +if (fs.existsSync(dest)) { fs.unlinkSync(dest) } -const srcStat = fs.statSync(src) -if (srcStat.isFile()) { +if (fs.existsSync(src)) { fs.copyFileSync(src, dest) fs.unlinkSync(src) } diff --git a/index.html b/index.html new file mode 100644 index 00000000..75c59904 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +思绪_一个极简的在线思维导图
\ No newline at end of file