hparra / gulp-rename

Rename files easily
MIT License
692 stars 73 forks source link

path.extname is renaming directories with dot #25

Closed christianhaller closed 9 years ago

christianhaller commented 10 years ago

gulp-rename If I call gulp-rename with gulp.src("test/*/") it renames also the directories with a dot in the dirname (e.g. www.google.com)

When I add the following lines in _nodemodules/gulp-rename/index.js it works

stream._transform = function(file, unused, callback) {
    if(!file.stat.isFile()){
        callback(null, file);
        return;
    }
shinnn commented 9 years ago

node-glob's nodir option helps you.

According to gulp.src documentation:

options

Type: Object

Options to pass to node-glob through glob-stream.

gulp adds some additional options in addition to the options supported by node-glob and glob-stream: