gruntjs / grunt

Grunt: The JavaScript Task Runner
http://gruntjs.com/
Other
12.26k stars 1.5k forks source link

Grunt concat task wildcard expression doesn't work properly #611

Open 0x-r4bbit opened 11 years ago

0x-r4bbit commented 11 years ago

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?

jrgifford commented 11 years ago

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

cowboy commented 11 years ago

Have you tried this with grunt@0.4.0rc7 and grunt-contrib-concat@0.1.2rc6? 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 commented 11 years ago

Closing this due to lack of updates.

Bennethon commented 8 years ago

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'
],
shama commented 8 years ago

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

Bennethon commented 8 years ago

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