How can I run a grunt task from within a grunt task?

后端 未结 4 1709
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 08:28

I\'ve created a new grunt task and within it I want to use grunt-contrib-concat to concatenate a few files together.

I looked through the docs but I don\'t find an

4条回答
  •  抹茶落季
    2020-12-13 09:22

    From https://github.com/gruntjs/grunt/wiki/Creating-tasks

    grunt.registerTask('foo', 'My "foo" task.', function() {
      // Enqueue "bar" and "baz" tasks, to run after "foo" finishes, in-order.
      grunt.task.run('bar', 'baz');
      // Or:
      grunt.task.run(['bar', 'baz']);
    });
    

提交回复
热议问题