From 547a7b7c7c0c091c589bc7f891e2503580a9e025 Mon Sep 17 00:00:00 2001 From: cutls Date: Sat, 8 Feb 2020 00:31:06 +0900 Subject: [PATCH] for pwa test --- app/view/make/make.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/view/make/make.js b/app/view/make/make.js index 99c24f80..688b4b26 100644 --- a/app/view/make/make.js +++ b/app/view/make/make.js @@ -6,8 +6,8 @@ if (process.argv.indexOf('--automatic') === -1) { } } var pwa = false -if (process.argv.indexOf('--pwa') === -1) { - pwa = true +if (process.argv.indexOf('--pwa') > 0) { + var pwa = true } const path = require('path') const basefile = path.join(__dirname, '../../') @@ -139,10 +139,10 @@ function main(ver, basefile, pwa) { source = source.replace(/@@lang@@/g, lang) source = source.replace(/@@langlist@@/g, langstr) if(pwa) { - source = source.replace(/@@pwa@@/g, '') + source = source.replace(/@@pwa@@/g, '') source = source.replace(/@@node_base@@/g, 'dependencies') } else { - source = source.replace(/@@pwa@@/g, '') + source = source.replace(/@@pwa@@/g, '') source = source.replace(/@@node_base@@/g, 'node_modules') } fs.writeFileSync(basefile + 'view/' + lang + '/' + pages[i], source)