Join GitHub today
Usemin does not include require.js in the build file #98
I am using requirejs with my project and generated it using Yeoman. All the js files are concatenated, uglified and so on correctly but I still end up having require.js in a seperate file.
Built HTML file:
It was working before I upgraded Yeoman. But as the building process is now purely managed via GruntJS I hope I have come to the right place. :) I think I am just missing a configuration somewhere so that require.js is put into the build js file and the HTML file is altered accordingly. Thx in advance
In case it's useful to anyone looking for an answer like, now … I got it sort of, mostly working by adding:
include: '../bower_components/requirejs/require', mainConfigFile: yeomanConfig.app + '/scripts/config.js', out: yeomanConfig.dist + '/scripts/app.min.js'
… to the Gruntfile's
<!-- build:js scripts/app.min.js --> <script data-main="scripts/config" src="bower_components/requirejs/require.js"></script> <!-- endbuild -->
<!-- REMOVE THIS AFTER `grunt build` --> <script data-main="scripts/config" src="bower_components/requirejs/require.js"></script> <!-- UNCOMMENT THIS AFTER `grunt build` --> <!-- <script src="scripts/app.min.js"></script> -->
Makes me wonder though, how hard would it be to add usemin task blocks like