grunt-contrib-concat concat目标源码图选项不起作用(windows)

时间:2015-06-11 13:04:13

标签: node.js gruntjs grunt-contrib-concat

当运行grunt concat时,控制台显示我的源地图已创建,但源文件地图不存在于我的文件系统中。

我的Gruntfile中的插件配置:

  grunt.config('concat',{
    scripts: {
      src: [
        grunt.config.get('pkg.src') + '/scripts/vendor/underscore*.js',
        grunt.config.get('pkg.src') + '/scripts/vendor/jquery*.js',
        grunt.config.get('pkg.src') + '/scripts/vendor/angular-*.js',
        grunt.config.get('pkg.src') + '/scripts/vendor/*.js',
        grunt.config.get('pkg.src') + '/scripts/source/main.js',
        grunt.config.get('pkg.src') + '/scripts/source/services/httpHelper.js',
        grunt.config.get('pkg.src') + '/scripts/source/**/*.js'
      ], 
      dest: 'static/server/scripts/app.js',
      options: {
        sourceMap: true
      }
    },
    styles: {
      src: [
        grunt.config.get('pkg.src') + '/styles/vendor/**/*.css',
        grunt.config.get('pkg.src') + '/styles/source/**/*.css'
      ],
      dest: 'static/server/styles/app.css'
    },
  });

控制台输出:

C:\workspace\someproject>grunt concat
Running "concat:scripts" (concat) task
Source map static/server/scripts/app.js.map created.
File static/server/scripts/app.js created.

Running "concat:styles" (concat) task
File static/server/styles/app.css created.

Done, without errors.

注意:我使用的是Windows 7,Node v0.12.0,Grunt v0.4.5,grunt-cli v0.1.13和grunt-contrib-concat 0.5.1。

0 个答案:

没有答案