From 5e3a96118200de1c220c89ff223ae05433460619 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 21 Feb 2019 14:53:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=20manifest.json=20nam?= =?UTF-8?q?e=20=E6=9B=BF=E6=8D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator.js b/generator.js index 5f77401..47a0f2d 100644 --- a/generator.js +++ b/generator.js @@ -18,7 +18,7 @@ async function generate (dir, files, base = '', rootOptions = {}) { } else { let content = fs.readFileSync(sourcePath, 'utf-8') if (path.basename(filename) === 'manifest.json') { - content = content.replace('{{name}}', rootOptions.projectName) + content = content.replace('{{name}}', rootOptions.projectName || '') } if (filename.charAt(0) === '_' && filename.charAt(1) !== '_') { files[`.${filename.slice(1)}`] = content