Created
June 8, 2014 02:21
-
-
Save dbashford/66f1ca3734280b72f182 to your computer and use it in GitHub Desktop.
Fixing ember-canary's r.js/almond build issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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