Skip to content

Instantly share code, notes, and snippets.

@dbashford
Created June 8, 2014 02:21
Show Gist options
  • Save dbashford/66f1ca3734280b72f182 to your computer and use it in GitHub Desktop.
Save dbashford/66f1ca3734280b72f182 to your computer and use it in GitHub Desktop.
Fixing ember-canary's r.js/almond build issues
var path = require( 'path' );
var _tweakEmber = function( mimosaConfig, options, next ) {
if (options.files && options.files.length) {
options.files.forEach( function( file ) {
if (path.basename(file.inputFileName) === "ember.js") {
file.inputFileText =
file.inputFileText.replace( /define\("ember",/, "define(\"ember-int\"," )
.replace(/requireModule\("ember"\)/, "requireModule(\"ember-int\")");
}
});
}
next();
};
exports.registration = function( mimosaConfig, register ) {
register( ['add','update','buildFile'], 'afterRead', _tweakEmber, ["js"] );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment