gruntjs / grunt-contrib-copy

Copy files and folders.
http://gruntjs.com/
MIT License
727 stars 194 forks source link

Images and webfont file getting corrupt although the noProcess is configured #278

Open xiamu14 opened 8 years ago

xiamu14 commented 8 years ago

copy: { options: { // exclude binary format from the processContent function noProcess: [ '**/*.{png,gif,jpg,ico,psd,ttf,otf,woff,svg}' ] }, libs: { expand: true, cwd: '/test/src/home/', src: '**', dest: '/test/dist/', }, }, this is my code, but imgage get corrupt

peterjanes commented 7 years ago

Is it possible the noProcess field doesn't support glob patterns? Try [ '**/*.png', '**/*.gif', ... ].

msqaddura commented 7 years ago

I had same issue with .mp3 files, @peterjanes suggestion is correct I have noticed that 'copy' uses 'grunt.file.copy', which uses 'path.join'. But I cannot see here anywhere for options https://nodejs.org/api/path.html#path_path_join_paths