Skip to content

Instantly share code, notes, and snippets.

@nathanlong
Last active January 1, 2016 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanlong/8185100 to your computer and use it in GitHub Desktop.
Save nathanlong/8185100 to your computer and use it in GitHub Desktop.
from https://github.com/gruntjs/grunt/issues/975#issuecomment-29058707 I've wanted this feature for a while too, especially as I'm using a plugin that depends on imagemin which can take up to 30 seconds to spin up. This slows everything down and is especially annoying as the task that relies on imagemin is barely used. I've recently found a way …
BEFORE
---
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.registerTask('images', ['copy:standardImages', 'responsive_images', 'imagemin']);
AFTER
---
grunt.registerTask('images', [], function () {
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.task.run('copy:standardImages', 'responsive_images', 'imagemin');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment