fis icon indicating copy to clipboard operation
fis copied to clipboard

debug大家如何做,比如通过参数开启debug

Open hxqbeyond opened this issue 10 years ago • 2 comments

比如?debug=1加载压缩前、合并前代码 目前我是用ssi判断是否存在相应参数 并输出对应代码。 fis每次编译的时候产出两份文件,一份压缩前、一份压缩后

hxqbeyond avatar Jun 17 '15 14:06 hxqbeyond

同问

fancyboynet avatar Jun 26 '15 01:06 fancyboynet

fis-config.js中获取fis.cli.commander,判断相关参数,然后就随便发挥咯~ 例如我在测试环境增加了一些辅助测试的工具

var dest = fis.cli.commander.commands[0].dest;

fis.config.set('modules.parser.html', function (content, file, settings) {
  if (file.filename === 'home') {
    content += '\n<script>require("crm/app.debug");</script>';
  }
  return content;
});

Clunt avatar Dec 30 '15 10:12 Clunt