Merge pull request #4 from zswang/master update jdists@1.3.3
Merge pull request #4 from zswang/master
update jdists@1.3.3
fis 插件 - jdists 代码块预处理
一般的项目会在多个地方进行发布,比如线上环境、内网环境、本地环境,除了配置以外。我们还希望能将特定的代码区块裁剪掉。
/*<debug>*/ console.log(debug); /*</debug>*/
#panel { /*<debug>*/ background-color: red; /*</debug>*/ }
<!--debug--> <span>测试版本,请勿对外公开</span> <!--/debug-->
function() {/*! <div> <a href="#{url}">#{title}</a> <button>cancel</button><button>download</button> </div> */}
安装 npm install fis-parser-jdists
npm install fis-parser-jdists
fis.config.set('modules.parser.js', 'fis-parser-jdists'); fis.config.set('settings.parser', [{ "remove": "debug,test" }]);
fis.match('*.js', { parser: fis.plugin('jdists', { remove: "debug,test" }) })
更详细的用法请参考:https://github.com/zswang/jdists
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
fis-parser-jdists
fis 插件 - jdists 代码块预处理
背景
一般的项目会在多个地方进行发布,比如线上环境、内网环境、本地环境,除了配置以外。我们还希望能将特定的代码区块裁剪掉。
定义
js 区域定义
css 区域定义
html 区域定义
函数注释字符 区域定义
使用
fis2
安装
npm install fis-parser-jdistsfis3
更详细的用法请参考:https://github.com/zswang/jdists