Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task fails due to Warning: grunt.util._.include is not a function #177

Closed
petetnt opened this issue Apr 1, 2016 · 3 comments
Closed

Task fails due to Warning: grunt.util._.include is not a function #177

petetnt opened this issue Apr 1, 2016 · 3 comments

Comments

@petetnt
Copy link

petetnt commented Apr 1, 2016

The following line throws with Grunt-1.0.0-rc1 with grunt-contrib-compress-1.1.1.

if (grunt.util._.include(['zip', 'tar', 'tgz', 'gzip', 'deflate', 'deflateRaw'], compress.options.mode) === false) {

    if (grunt.util._.include(['zip', 'tar', 'tgz', 'gzip', 'deflate', 'deflateRaw'], compress.options.mode) === false) {
      grunt.fail.warn('Mode ' + String(compress.options.mode).cyan + ' not supported.');
    }

This is due to Grunt updating to lodash 4.3.0 which removed the alias _.include in favor of _.includes in 4.0.0..

(grunt.util._ is deprecated and should most likely not be used anyway)

My task:

compress: {
  foo: {
    options: {
      archive: "foo/bar.zip"   
    },
    files: [{
      expand: true,
      flatten: true,
      cwd: 'foo/',
      src: ['**', '!*.zip'],
      filter: 'isFile'
    }]
  }
}
@vladikoff
Copy link
Member

cc @shama

@shama shama closed this as completed in 2edf867 Apr 1, 2016
@shama
Copy link
Member

shama commented Apr 1, 2016

Thanks for the great issue report @petetnt!

@petetnt
Copy link
Author

petetnt commented Apr 2, 2016

Thanks for the fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants