Neoclassical Piano Montage
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    grunt-htmlmagickpublic

    grunt-htmlmagick v1.0.0

    mangle for html.

    Getting Started

    This plugin requires Grunt ~0.4.0

    npm install --save-dev grunt-htmlmagick

    Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

    grunt.loadNpmTasks('grunt-htmlmagick');

    Example (coffee-style)

     
    # addAlt is most simple magick. 
    # Please your imagine. 
    addAlt = (html,callback)->
      # this.$ is jQuery 2.1.0 (current version) 
      this.$('img:not([alt])').attr 'alt',''
      return callback null
      
      # if task is error then call this. 
      # in that case then block the task. 
      return callback 'errortype'
     
    grunt.initConfig
      htmlmagick:
        imgfix:
          options:
            use:[addAlt# subscribe the addAlt magick 
          files:[
            'test/after/index.html':['test/before/index.html']
            'test/after/aboutme.html':['test/before/aboutme.html']
            'test/after/contact.html':['test/before/contact.html']
          ]

    For more information, please see below.

    node_modules/grunt-htmlmagick/test/gruntfile.coffee

    Release History

    • 2014-04-26 1.0.0 bundle the jquery

    Task submitted by AtuyL

    This document is extended from grunt-contrib-coffee document.
    thank you for reading. :)

    Keywords

    none

    install

    npm i grunt-htmlmagick

    Downloadsweekly downloads

    7

    version

    1.0.0

    license

    BSD-2-Clause

    repository

    githubgithub

    last publish

    collaborators

    • avatar