我的Gruntfile是:
requirejs: {
dist: {
options: {
baseUrl: '<%= yeoman.app %>/scripts',
optimize: 'none',
paths: {
'jquery': 'app/scripts/bower_components/jquery/dist/jquery',
'backbone': 'app/scripts/bower_components/backbone/backbone',
'backbone.marionette': 'app/scripts/bower_components/marionette/lib/backbone.marionette',
'backbone.query.parameters': 'app/scripts/bower_components/backbone-query-parameters/backbone.queryparams',
'backbone.localstorage': 'app/scripts/bower_components/backbone.localstorage/backbone.localStorage',
'underscore': 'app/scripts/bower_components/lodash/dist/lodash',
'bootstrap': 'app/scripts/bower_components/bootstrap-sass-official/assets/javascripts/bootstrap',
'highcharts': 'app/scripts/bower_components/highcharts/highcharts',
'highcharts.exporting': 'app/scripts/bower_components/highcharts/modules/exporting',
'highstock': 'app/scripts/bower_components/highstock-release/highstock',
'highmaps': 'app/scripts/bower_components/highmaps-release',
'jqx': 'app/scripts/vendor/jqwidgets',
'globalize': 'app/scripts/vendor/jqwidgets/globalization/globalize',
'globalize.culture.es-CO': 'app/scripts/vendor/jqwidgets/globalization/globalize.culture.es-CO',
'text': 'app/scripts/bower_components/requirejs-plugins/lib/text',
'json': 'app/scripts/bower_components/requirejs-plugins/src/json',
'jQuery.print': 'app/scripts/bower_components/jQuery.print/jQuery.print',
'moment': 'app/scripts/bower_components/momentjs/moment'
},
// TODO: Figure out how to make sourcemaps work with grunt-usemin
// https://github.com/yeoman/grunt-usemin/issues/30
//generateSourceMaps: true,
// required to support SourceMaps
// http://requirejs.org/docs/errors.html#sourcemapcomments
preserveLicenseComments: false,
useStrict: true,
wrap: true,
}
}
},`
执行时我有这个错误
错误:错误:缺少&#34; out&#34;或者&#34; dir&#34;配置值。如果使用&#34; appDir&#34;要进行完整的项目优化,请使用&#34; dir&#34;。如果要优化到一个文件,请使用&#34; out&#34;。 在Function.build.createConfig(D:\ LauraAcosta \ Fuentes Estadisticas \ AgronetEstadisticas-master \ node_modules \ grunt-requirejs \ node_modules \ requirejs \ bin \ r.js:31109:19) 警告:任务&#34; requirejs:dist&#34;失败。使用--force继续。
我不知道这个错误的原因。谢谢!