grunt icon indicating copy to clipboard operation
grunt copied to clipboard

Grunt concat task wildcard expression doesn't work properly

Open 0x-r4bbit opened this issue 12 years ago • 6 comments

Hey guys,

I'm using the concat task in one of my projects using the wildcard syntax to specify a pattern of files to match. It works fine for me.

However it seems like there are problems with the wildcard syntax on different machines. Regarding this issue, it turned out that using wildcard syntax in concat task doesn't work properly.

We fixed this temporary by specifying the files names in an array.

Is this a known issue?

0x-r4bbit avatar Jan 09 '13 09:01 0x-r4bbit

Also: Seems to be a problem with Ubuntu. I'm using Ubuntu 12.10, with node v0.8.17 from the official PPA.

jrgifford avatar Jan 16 '13 18:01 jrgifford

Have you tried this with [email protected] and [email protected]? Grunt uses the node-glob lib for globbing, which claims to sort its results. If it's not sorting properly, this might be a bug with the underlying lib.

cowboy avatar Jan 28 '13 16:01 cowboy

Closing this due to lack of updates.

cowboy avatar Mar 12 '13 19:03 cowboy

I am also having this problem.

This is not working for me

concat: {
    app: {
        src: ['app/**/*.min-safe.js'],
        dest: 'app/app.min.js'
    }
},

But when I specify every directory, it works fine:

src: [
    'app/*.min-safe.js',
    'app/dashboard/*.min-safe.js',
    'app/error/*.min-safe.js',
    'app/groups/*.min-safe.js',
    'app/shared/*.min-safe.js'
],

Bennethon avatar Apr 12 '16 15:04 Bennethon

@Bennethon Which version of Grunt, Node.js and OS? Thanks!

shama avatar Apr 12 '16 15:04 shama

@shama node - 0.12.5 grunt - 1.0.1 grunt-contrib-concat - 1.0.0 Windows 7 (64)

Bennethon avatar Apr 12 '16 15:04 Bennethon