grunt-pot icon indicating copy to clipboard operation
grunt-pot copied to clipboard

Warning: Object true has no method 'indexOf' Use --force to continue.

Open joelworsham opened this issue 10 years ago • 5 comments

Nothing abnormal going in here.

pot: {
    build: {
        options: {
            text_domain: text_domain,
            dest: 'build/languages/',
            keywords: ['gettext', '__', '_e']
        },
        files: {
            src: ['build/**'],
            expand: true
        }
    }
}

joelworsham avatar Feb 11 '15 18:02 joelworsham

Try

pot: {
        options: {
            text_domain: text_domain,
            dest: 'build/languages/',
            keywords: ['gettext', '__', '_e']
        },
        files: {
            src: ['build/**'],
            expand: true
        }
}

also note the recent 0.2.1 update: https://github.com/stephenharris/grunt-pot/issues/10.

stephenharris avatar Feb 12 '15 11:02 stephenharris

Same error is occurring.

joelworsham avatar Feb 12 '15 12:02 joelworsham

Don't know then I'm afraid. Works for me.

stephenharris avatar Feb 12 '15 12:02 stephenharris

Are there any dependencies I could be missing?

joelworsham avatar Feb 12 '15 13:02 joelworsham

I'm new to Grunt, but I believe the problem is that this task is not really setup for multitask. When a task is a multitask, Grunt sends different parameters. I tracked down the problem. For it to work properly as a multitask, the code at line 87 should be changed to something like this:

    this.files[0].src.forEach(function(file) {
        if( !grunt.file.isDir( file ) ){
            inputFiles +=  " " + file;
        }
    });

Ref. #12

luiz-brandao avatar Apr 01 '15 04:04 luiz-brandao