Package Exports
- fis-postprocessor-region
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fis-postprocessor-region) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fis-postprocessor-region
fis 插件 - 处理区块裁剪
背景
一般的项目会在多个地方进行发布,比如线上环境、内网环境、本地环境,除了配置以外。我们还希望能将特定的代码区块裁剪掉。
定义
js 区域定义
/*<debug>*/
console.log(debug);
/*</debug>*/
css 区域定义
#panel {
/*<debug>*/
background-color: red;
/*</debug>*/
}
html 区域定义
<!--debug-->
<span>测试版本,请勿对外公开</span>
<!--/debug-->
使用
安装 npm install fis-postprocessor-region
fis.config.set('modules.parser.js', 'fis-postprocessor-region');
fis.config.set('settings.parser', [{
"remove": "debug,test"
}]);
更详细的用法请参考:https://github.com/zswang/jdists