Socket
Book a DemoInstallSign in
Socket

fis3-parser-preprocessor

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis3-parser-preprocessor

处理html ,css ,js中根据注释条件来生成可运行的代码, 类似 gulp-preprocess, 适合要区分不同环境的情况,比如线上线下,多语言国际化等

0.0.7
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

fis配置使用方法

fis.match('{*.html,*.css,*.js}', {
    parser: [fis.plugin('preprocessor', {
        context: {
            system: lang
        },
        options: {
        }
    })]
})
  • 具体api请查看preprocess

代码里边用法

html中
<!--@if system='cn' --> 或者 <!--@if system!='cn' -->
<!--@endif-->
js中
//@if system='cn' 或者 //@if system!='cn'
//@endif
css中
/* @if system='cn' */ 或者 /* @if system!='cn' */
/* @endif */

Keywords

fis3

FAQs

Package last updated on 01 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.