Skip to content

Incorrect filter for paths with dots "../../" #5

@colorwebdesigner

Description

@colorwebdesigner

My project structure looks like this:

project/
   build/
      css/
      js/
      img/
   gulpfile.js

if i set opts.fullPath and use in CSS url like:

body {
  background: url(../img/bg/my-super-bg-1600x.jpg);
}

then gulp-responsive-config processing it with dots and gulp-responsive can not find images in source folder build/img

FIX in index.js at line 30:

var dirname = opts.fullPath ? path.dirname(imagePath) : '';

// Add this line
dirname = dirname.replace(/^(?:\.\.\/)+/, "");
// ---

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions