Question

Can't make working subtask in my gruntfile. My task:

uglify: {
  foo: {
    options: {             
    },
    dist: {
      files: {
        'test.min.js': [
            "test.js",
            "test2.js"
         ]
      }
    }
  }
}

Grunt log in console:

Running "uglify:foo" (uglify) task

Done, without errors

But not create file test.min.js. And everything working if I comment foo string subtask like //foo: {and //} How I can run subtasks ?

Was it helpful?

Solution

Your task config is wrong. It should be:

uglify: {
  foo: {
    options: {             
    },
    files: {
      'test.min.js': [
          "test.js",
          "test2.js"
       ]
    }
  }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top