stephenharris / grunt-pot

Scan files and creates a .pot file using xgettext
MIT License
53 stars 13 forks source link

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

Open joelworsham opened 9 years ago

joelworsham commented 9 years ago

Nothing abnormal going in here.

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

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.

joelworsham commented 9 years ago

Same error is occurring.

stephenharris commented 9 years ago

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

joelworsham commented 9 years ago

Are there any dependencies I could be missing?

luiz-brandao commented 9 years ago

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