a replace preprocessor plugin for fis3 在 preprocessor 阶段,对文件的内容进行替换
install
npm install fis3-preprocessor-replace-multi --save-devuse
fis.match('**.js', {
preprocessor: fis.plugin('replace-multi', {
'before replace': 'after replace',
'__DEBUG': false
}, 'append')
}); var str = 'before replace';
var url = __DEBUG ? 'http://dev.github.com' : 'https://github.com' var str = 'after replace';
var url = false ? 'http://dev.github.com' : 'https://github.com'