konstantinbueschel
1/17/2014 - 1:01 AM

Alloy built in underscore.js replace to lo-dash.js put your project folder app/assets/javascript/lodash.underscore.js

Alloy built in underscore.js replace to lo-dash.js put your project folder app/assets/javascript/lodash.underscore.js

task("pre:compile", function(event,logger) {
	logger.info('----- PRE:COMPILE -----');
});

task("post:compile",function(event,logger){
	logger.info('----- POST:COMPILE -----');

	var fs = require('fs'),
		path = require('path'),
		platform = event.alloyConfig.platform === 'ios' ? 'iphone' : event.alloyConfig.platform;	// Resources/iphone
	fs.writeFileSync(path.join(event.dir.resources, platform, 'alloy', 'underscore.js'),
		fs.readFileSync(path.join(event.dir.assets, 'javascript', 'lodash.underscore.js')));
});