F
F
fAra0N252014-02-21 16:20:30
Node.js
fAra0N25, 2014-02-21 16:20:30

How can I compile only the modified file on Grunt, and not the entire bunch of files in the task?

Dear community, please tell me how to implement the compilation of only the modified file on Grunt, and not the entire bunch of files in the task. Those. I have a task:

coffee:
      compile:
        expand: true
        cwd: 'app/js'
        src: ['*.coffee','**/*.coffee']
        dest: 'public/js'
        ext: '.js'

watch:
      coffee:
        files: ['*.coffee','**/*.coffee']
        tasks: ['coffee:compile']

When changing one coffee file, all files matching the src condition are compiled at once. This also applies to SCSS and Jade files. For coffee, I used Jitter before , it only compiles the modified file, but I would like to do this within Grunt and not just coffee files.
Is it possible to implement this in Grunt? If yes, please tell me how and by what means?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Chernyshov, 2014-02-21
@fAra0N25

grunt newer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question