我收到以下错误
uncaught exception: Please include Backbone.ModelBinder.js before Backbone.CollectionBinder.js
做完之后
node r.js -o build.js
我的 build.js 文件是
({
"mainConfigFile": 'js/main.js',
"name": "main",
"include": [
"lib/require/require-with-comments.js"
],
"exclude": [],
"optimize": "uglify2",
"out": "main-built.js",
"insertRequire": [
"js/main"
]
})
我的要求配置如下
require.config({
// The shim config allows us to configure dependencies for
// scripts that do not call define() to register a module
urlArgs: "bust=" + (new Date()).getTime(),
shim: {
'underscore': {
exports: '_'
},
'bootstrap': {
deps: [
'jquery'
]
},
'backbone': {
deps: [
'underscore',
'jquery'
],
exports: 'Backbone'
}, 'handlebars': {
exports: 'Handlebars'
}, 'handlebarsview': {
deps: [
'backbone',
'handlebars'
],
exports: 'HandlebarsView'
}, 'highcharts': {
deps: [
'jquery'
],
exports: 'highcharts'
}
, 'collectionbinderview': {
deps: [
'backbone',
'jquery',
'underscore',
'modelbinderview'
]
}, 'purl' : {
deps : ['jquery']
}
, 'select2': {
deps: [
'jquery'
],
exports: 'select2'
}
, 'customSelect': {
deps: [
'jquery'
],
exports: 'customSelect'
}
, 'datepicker': {
deps: [
'jquery',
'momentjs'
],
exports: 'datepicker'
}
},
paths: {
jquery: 'lib/jquery/jquery.min',
bootstrap: 'lib/bootstrap/bootstrap',
underscore: 'lib/lodash/lodash.min',
backbone: 'lib/backbone/backbone',
text: 'lib/require/text',
handlebars: 'lib/view/hacked-handlebars-1.0.0',
handlebarsview: 'lib/view/backbone.handlebars',
collectionbinderview: 'lib/view/Backbone.CollectionBinder',
modelbinderview: 'lib/view/Backbone.ModelBinder',
highcharts: 'lib/charting/highcharts',
momentjs: 'lib/view/moment',
select2: 'lib/select2/select2',
customSelect: 'lib/customSelect/customSelect',
datepicker: 'lib/view/datepicker',
purl : 'lib/purl/purl'
}
});
谁能告诉我我做错了什么?