Coder Social home page Coder Social logo

fis-parser-jdists's Introduction

fis-parser-jdists

Build Status NPM version

fis 插件 - jdists 代码块预处理

背景

一般的项目会在多个地方进行发布,比如线上环境、内网环境、本地环境,除了配置以外。我们还希望能将特定的代码区块裁剪掉。

定义

js 区域定义

/*<debug>*/
console.log(debug);
/*</debug>*/

css 区域定义

#panel {
/*<debug>*/
  background-color: red;
/*</debug>*/
}

html 区域定义

<!--debug-->
<span>测试版本,请勿对外公开</span>
<!--/debug-->

函数注释字符 区域定义

function() {/*!
<div>
  <a href="#{url}">#{title}</a>
  <button>cancel</button><button>download</button>
</div>
  */}

使用

安装 npm install fis-parser-jdists

fis.config.set('modules.parser.js', 'fis-parser-jdists');
fis.config.set('settings.parser', [{
  "remove": "debug,test"
}]);

更详细的用法请参考:https://github.com/zswang/jdists

fis-parser-jdists's People

Contributors

zswang avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.