1

我的 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,                    
            }
        }
    },`

执行时出现此错误

错误:错误:缺少“out”或“dir”配置值。如果使用“appDir”进行完整的项目优化,请使用“dir”。如果要优化到一个文件,请使用“out”。在 Function.build.createConfig (D:\LauraAcosta\Fuentes Estadisticas\AgronetEstadisticas-master\node_modules\grunt-requirejs\node_modules\requirejs\bin\r.js:31109:19) 警告:任务“requirejs:dist”失败。使用 --force 继续。

我不知道这个错误的原因。谢谢!

4

0 回答 0