Nincompoops Producing Methane
    Have ideas to improve npm?Join in the discussion! »

    grunt-webpcss-enhance

    0.1.1 • Public • Published

    grunt-webpcss-enhance

    适配webp格式图片处理样式表的grunt插件

    Getting Started

    This plugin requires Grunt ~0.4.5

    用法

    1.安装

      npm install grunt-webpcss --save-dev

    2.gruntfile 基本用法

       grunt.loadNpmTasks('grunt-webpcss');
        ...
          webpcss: {
     
              mytask: {
                  options: {
                      webpClass:'.webp',
                      noWebpClass:"",
                      imgRules:{
                          replace_from:/\.(png|jpg|jpeg)/,
                          replace_to:".webp"
                      },
                      urlRules:{
                          replace_from:'../images',
                          replace_to:'../images/webp'
                      },
                      cssStyles:{
                          compatibility:true,
                          keepBreaks:true,
                          advanced:false
                      }
                  },
                  files: {
                     './app2.css': ['./test/app.css']
                  }
              }
            }
        ...

    Install

    npm i grunt-webpcss-enhance

    DownloadsWeekly Downloads

    0

    Version

    0.1.1

    License

    none

    Last publish

    Collaborators

    • avatar