Frage

Having a problem with Grunt and Copying files.

When adding the expand true this line of code it is completely skipped over.

{
   expand:true, 
   flatten: true, 
   src: ['bower_components/****/bootstrap/less/*.less'], 
   dest: 'codebase/assets/less/'
}

I am using both --verbose and --stack to see where the issue is and there is no error when running the code.  

When the expand true is taken out the files are copied over but the parent directories are added in.  So it seems to me there is an issue with the expand: true option here.

I have tried with 'cwd' and 'src' being set to '*' as well and it doesn't work either.

War es hilfreich?

Lösung

Try adding filter: 'isFile' to your config: i.e.

copy: {
    bootstrap: {
        expand: true,
        flatten: true,
        src: ['bower_components/**/bootstrap/less/*.less'],
        dest: 'codebase/assets/less/',
        filter: 'isFile'
    }
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top