fis3 icon indicating copy to clipboard operation
fis3 copied to clipboard

FIS3能不能实现replace和zip并存,我需要打包成zip包,且打包前需要对页面进行replace操作

Open saqqdy opened this issue 7 years ago • 1 comments
trafficstars

FIS3能不能实现replace和zip并存,我需要打包成zip包,且打包前需要对页面进行replace操作 function replacer(opt,zip) { if (!Array.isArray(opt)) { opt = [opt]; } var r = []; opt.forEach(function (raw) { r.push(fis.plugin('replace', raw)); }); if (!Array.isArray(zip)) { zip = [zip]; } if(zip){ zip.forEach(function (raw) { r.push(fis.plugin('zip', raw)) }); } return r; };

fis.media('prod') .match('**',{ deploy: replacer([ { from: /.html?/g, to: '.html?v=1.0.0&' } ],[{ filename: "output.zip" }]).concat(fis.plugin('local-deliver',{ to: '../tags' })) }) 试了很多种写法,都不行

saqqdy avatar Apr 04 '18 05:04 saqqdy

有人知道么?

saqqdy avatar May 15 '18 02:05 saqqdy