Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mainConfigFile ignored #96

Open
SerzN1 opened this issue Apr 25, 2014 · 5 comments
Open

mainConfigFile ignored #96

SerzN1 opened this issue Apr 25, 2014 · 5 comments
Assignees

Comments

@SerzN1
Copy link

SerzN1 commented Apr 25, 2014

all from your example

requirejs: {
  compile: {
    options: {
        baseUrl: "<%= frontendNewFolder %>/js/",
        out: "<%= frontendNewFolder %>/js/dist/App.js",
        mainConfigFile: "<%= frontendNewFolder %>/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?

@SerzN1
Copy link
Author

SerzN1 commented Apr 25, 2014

if i copy all from config file to grunt task - it's working!

@asciidisco asciidisco self-assigned this Apr 25, 2014
@asciidisco
Copy link
Owner

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.

@SerzN1
Copy link
Author

SerzN1 commented Apr 28, 2014

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
})

@asciidisco
Copy link
Owner

Phew.
I will try to reproduce it, but can't guarantee anything. Could also take some time...

@Blasz
Copy link

Blasz commented Aug 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants