From f5ede3bde63234023e1e13fec36088ff0c4d5b75 Mon Sep 17 00:00:00 2001 From: liujiangnan <695541723@qq.com> Date: Fri, 18 Jun 2021 01:45:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=9F=E4=B8=80=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- bin/publish.js | 10 +++++----- {index => play}/index.css | 0 {index => play}/index.html | 0 {index => play}/index.js | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename {index => play}/index.css (100%) rename {index => play}/index.html (100%) rename {index => play}/index.js (100%) diff --git a/app.js b/app.js index 55e948f..24a36a9 100644 --- a/app.js +++ b/app.js @@ -60,4 +60,4 @@ var server = http.createServer(function (request, response) { server.listen(PORT); console.log("Server runing at port: " + PORT + "."); console.log("visit form : http://localhost:"+PORT+"/form/index.html"); -console.log("visit index : http://localhost:"+PORT+"/index/index.html"); \ No newline at end of file +console.log("visit play : http://localhost:"+PORT+"/play/index.html"); \ No newline at end of file diff --git a/bin/publish.js b/bin/publish.js index c753bf3..a30683c 100644 --- a/bin/publish.js +++ b/bin/publish.js @@ -71,9 +71,9 @@ const runSpawn = async function (){ fs.mkdirSync(path.resolve(__dirname,"../dist/form")); } try { - await fsp.access(path.resolve(__dirname,"../dist/index"), fs.constants.F_OK); + await fsp.access(path.resolve(__dirname,"../dist/play"), fs.constants.F_OK); } catch (error) { - fs.mkdirSync(path.resolve(__dirname,"../dist/index")); + fs.mkdirSync(path.resolve(__dirname,"../dist/play")); } try { await fsp.access(path.resolve(__dirname,"../dist/lib"), fs.constants.F_OK); @@ -81,12 +81,12 @@ const runSpawn = async function (){ fs.mkdirSync(path.resolve(__dirname,"../dist/lib")); } await copy(path.resolve(__dirname,"../form"), path.resolve(__dirname,"../dist/form")); - await copy(path.resolve(__dirname,"../index"), path.resolve(__dirname,"../dist/index")); + await copy(path.resolve(__dirname,"../play"), path.resolve(__dirname,"../dist/play")); await copy(path.resolve(__dirname,"../lib"), path.resolve(__dirname,"../dist/lib")); - let str = fs.readFileSync(path.resolve(__dirname,"../dist/index/index.html"),{encoding: 'utf8'}); + let str = fs.readFileSync(path.resolve(__dirname,"../dist/play/index.html"),{encoding: 'utf8'}); str = str.replace('<base href="">','<base href="template-base-href">'); - fs.writeFileSync(path.resolve(__dirname,"../dist/index/index.html"),str); + fs.writeFileSync(path.resolve(__dirname,"../dist/play/index.html"),str); await new Promise(function(resolve,reject){ let pkg = require("../package.json"); diff --git a/index/index.css b/play/index.css similarity index 100% rename from index/index.css rename to play/index.css diff --git a/index/index.html b/play/index.html similarity index 100% rename from index/index.html rename to play/index.html diff --git a/index/index.js b/play/index.js similarity index 100% rename from index/index.js rename to play/index.js -- 2.21.0