yeoman / grunt-bower-requirejs

[DEPRECATED] Grunt task - Automagically wire-up installed Bower components into your RequireJS config
198 stars 24 forks source link

Task is eating comments and executing JavaScript in custom `urlArgs` #17

Closed m90 closed 10 years ago

m90 commented 10 years ago

Is there any way of having the task respect comments and JavaScript in my custom urlArgs that I pass to requirejs.config?

Usually I like to include something like this (for cache-busting while developing) in my configuration:

requirejs.config({
    //>>excludeStart("build", true);
    urlArgs: "bust=" + Date.now()
    //>>excludeEnd("build");
});

yet after running the bower task this will look like:

requirejs.config({
    urlArgs: "bust=1398586856365"
});

Is there anything I can do about this? Can this be fixed task-side?

florianv commented 10 years ago

This is not possible due to the way the config is modified using this function https://github.com/jrburke/r.js/blob/78db3e718a987449df74a5875a7ff91cd7825974/build/jslib/transform.js#L288