0.0.8 • Published 8 years ago

fis-preprocessor-srcset v0.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

fis-preprocessor-srcset

fis-preprocessor-srcset插件(npm地址 github地址)支持解析<img><picture>标签的srcset属性中的图片路径

   	<picture>
   		<source srcset="./image/banner-small.png 1x, ./image/banner-large.png 2x"/>
   		<img src="./image/banner-small.png"/>
   	</picture>
   	

使用

    //install
    npm install -g fis-preprocessor-srcset


    //config
    vi <project>/fis-conf.js

    //fis3之前
    fis.merge.config({
        modules: {
            preprocessor: {
                tpl: "srcset" //如果您使用的是fis-plus或其它的解决方案,则需要加上相应的模板前处理插件,例如fis-plus中需要调整为"components,extlang,srcset"
            }
        },
        ....
    });
    
    //fis3
    fis.match('*.tpl', {
        preprocessor: fis.plugin('srcset')
    });
    
0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.1.0

8 years ago