Search code examples
gruntjsgrunt-contrib-concat

grunt concat not concatenating


I'm trying to use Grunt to combine and minify mi site's static files, but I'm finding some weird trouble with "concat". I already have working compass through grunt as I'd like, but for some reason concat is not producing any output at all...

My Gruntfile.js reads:

    concat: {
        options: {
            separator: ';',
            nonull: true
        },
        dist: {
            options: {
                src: ['testsrc/*.js'],
                dest: 'app.min.js'
            }
        }
    },

And I have a couple of js files inside testsrc, from which I want to produce app.min.js. But when I run grunt concat I get this output:

Running tasks: concat:dist

Running "concat:dist" (concat) task
Verifying property concat.dist exists in config...OK
File: [no files]
Options: separator=";", banner="", footer="", stripBanners=false, process=false, sourceMap=false, sourceMapName=undefined, sourceMapStyle="embed", nonull, src=["testsrc/*.js"], dest="app.min.js"

Done, without errors.

... and app.min.js is nowhere to be found.

Shouldn't this work as it is? Of course grunt-contrib-concat is declared in my package.json (otherwise the above wouldn't work at all)... I see the "File: [no files]" result, but I thought that by declaring the src Grunt would find the needed files.


Solution

  • Is it because of the typo testsrc vs test?

    BTW, for the dist target, no need to wrap src/dest with options unless you need to reuse.