Coder Social home page Coder Social logo

grunt-requirejs-cachebuster's Introduction

grunt-bushcaster

cachebuster with a function to update references in the sources (useful for requirejs dependencies)

todos

  • support reading the config from requirejs config
  • more sophisticated testing
  • lots'more afaik...

sample:

'bushcaster' : {
  files : [
    {
      expand: true,
      cwd: 'test/dist/',
      src: ['**/*.js']
    }
  ],

  options : {
    // working directory, to be stripped from filepaths
    // might work around it to use cwd in files...
    dir : 'test/dist',

    // length of the hash to be added
    hashLength : 8,

    // should we removed the source files?
    removeSources : true,

    // globbing pattern for files that sould not be processed with updated references
    // useful for libs, like jquery, or so - might speed up the whole process a bit
    noProcess : 'test/dist/vendor/**/*.js',

    // function to handle the hash map
    // so you can write the output to json or sth ;-)
    onComplete  : function ( map, files ) { ... }
  }
}

contributing

since it's work in progress, i know there's a lot to do... but feel free to send in bugs, PRs here

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.