From 966c1d2954b2581604989c84f46da79e119c1f28 Mon Sep 17 00:00:00 2001 From: youki Date: Tue, 8 Sep 2020 10:59:02 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-5364=20chore:=20=E7=BB=99fineui.js?= =?UTF-8?q?=E5=8A=A0=E4=B8=8AsourceMap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/postbuild/postbuild.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/postbuild/postbuild.js b/lib/postbuild/postbuild.js index 290e7d53e..605104f02 100644 --- a/lib/postbuild/postbuild.js +++ b/lib/postbuild/postbuild.js @@ -34,9 +34,12 @@ deleteList.forEach(filename => { }); }); -const demoJs = resolve(dest, './demo.js'); - -const content = `${readFileSync(demoJs, { encoding: 'utf8' })} -//# sourceMappingURL=./demo.js.map`; +const fileList = ['demo.js', 'fineui.js', '2.0/fineui.js']; +fileList.forEach(filename => { + const sourcefile = resolve(dest, `./${filename}`); + + const content = `${readFileSync(sourcefile, { encoding: 'utf8' })} +//# sourceMappingURL=./${filename}.map`; -writeFileSync(demoJs, content); + writeFileSync(sourcefile, content); +})