grunt-requirejs
grunt-requirejs copied to clipboard
mainConfigFile ignored
all from your example
requirejs: { compile: { options: { baseUrl: "/js/", out: "/js/dist/App.js", mainConfigFile: "/js/build.config.js" } } } Running "requirejs:compile" (requirejs) task { [Error: Error: Missing either a "name", "include" or "modules" option at Function.build.createConfig (C:\RKassa\Afisha.Tickets\node_modules\grunt- contrib-requirejs\node_modules\requirejs\bin\r.js:26800:19) ] originalError: [Error: Missing either a "name", "include" or "modules" option] } build.config.js ... include: [ 'almond' , 'App' , 'section/schedule' , 'section/forms' , 'section/showroom' , 'stub/maps' , 'stub/city_select' , 'stub/search' , 'stub/slider' , 'hallplan' ] ...
config ignored?
if i copy all from config file to grunt task - it's working!
Normally, this should work :/
Could you post the complete contents of your build.config.js
please, I have a feeling in my gut, that the error could be in there.
Also, it would be interesting to see if the default r.js
optimiser is able to do the build (without grunt), could you please try that?
Thanks.
Hi. Yes, r.js build success.
biuld.config.js
({ baseUrl : "../js", paths: { 'App' : 'App', 'requireLib' : 'vendor/require', 'almond' : 'vendor/almond', 'curl' : 'vendor/curl', 'window' : 'stub/window', 'jquery' : 'vendor/jquery-1.10.2.min', //'jquery' : 'empty:', 'jqueryui' : 'vendor/jqueryui', 'jqueryvalidate' : 'vendor/jquery.validate.min', 'plugins' : 'plugins', 'main' : 'main', 'city_select' : 'stub/city_select', 'drop_down' : 'stub/drop_down', 'maps' : 'stub/maps', 'checkboxFilter' : 'stub/checkboxFilter', 'metroFilter' : 'stub/metroFilter', 'nameFilter' : 'stub/nameFilter', 'scroll' : 'stub/scroll', 'search' : 'stub/search', 'slider' : 'stub/slider', 'schedule' : 'section/schedule', 'showroom' : 'section/showroom', 'forms' : 'section/forms', 'hallplan' : 'kassa.hallplan' }, //mainConfigFile: "require.config.js", include: [ 'almond' , 'App' , 'section/schedule' , 'section/forms' , 'section/showroom' , 'stub/maps' , 'stub/city_select' , 'stub/search' , 'stub/slider' , 'hallplan' ], name: "App", out: "dist/App.js", inlineText: false, wrap: { start: "(function(){", end: "new (require('App')); \n}());" }, //optimize: 'uglify2' optimize: 'none', preserveLicenseComments: false })
Phew. I will try to reproduce it, but can't guarantee anything. Could also take some time...
Explanation: https://github.com/gruntjs/grunt-contrib-requirejs/issues/41#issuecomment-52129662