1

我的 Grunt 文件如下所示:

"use strict"

module.exports = (grunt) ->
  require("load-grunt-tasks") grunt
  # Project configuration.
  grunt.initConfig
    appConfig:
      # configurable paths
      app: "app"
      server: "server"
      dist: "dist"

    # ngMin
    ngmin:
      dist:
        files: [
          cwd: '<%= appConfig.app %>/scripts'
          src: ['**/*.js']
          dest: ['<%= appConfig.dist %>/scripts']

        ]

但是当我运行它时,我得到:

Running "ngmin:dist" (ngmin) task
Warning: Arguments to path.join must be strings Use --force to continue.

我究竟做错了什么?

4

1 回答 1

2

目标dest应该是单个文件夹,而不是列表:

                dest: '<%= appConfig.dist() %>/scripts'

不是:

                dest: [ '<%= appConfig.dist() %>/scripts' ]
于 2013-11-10T14:13:14.383 回答