Skip to content

Instantly share code, notes, and snippets.

@k0sukey
Created January 17, 2013 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k0sukey/4552434 to your computer and use it in GitHub Desktop.
Save k0sukey/4552434 to your computer and use it in GitHub Desktop.
Replace Resources/alloy/backbone.js, undercore.js
task("pre:compile", function(event,logger){
});
task("post:compile",function(event,logger){
var fs = require("fs");
fs.writeFileSync(event.dir.resourcesAlloy + '/underscore.js', fs.readFileSync('path/to/underscore.js', 'utf8'));
var backbone = fs.readFileSync('path/to/backbone.js').toString();
fs.writeFileSync(event.dir.resourcesAlloy + '/backbone.js', backbone.replace(/require\("underscore"\)/, 'require("alloy/underscore")'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment