Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gulp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gulp
  • gulp
  • Issues
  • #699
Closed
Open
Issue created Sep 24, 2014 by Administrator@rootContributor

Incorrect relative path in gulp.dest() > vinyl-fs

Created by: demisx

I have an issue with relative path being incorrectly calculated in vinyl-fs module used by gulp. Please let me know if this should be entered under vinyl-fs project instead.

When I pass gulp.src a direct path string, the relative.path in vinyl-fs/lib/dest/index.js is set to the file name only, meaning it looses the directory prefix:

gulp.task "watch-less", -> 
  gulp.src "app/css/bootstrap-scoped.less"
  .pipe gulp.dest('.build') # file.relative == 'bootstrap-scoped.less' (note: `css/` dir is lost)
  return  

However, if I pass a glob string instead of direct path, then the relative path is properly calculated and the directory prefix is present:

gulp.task "watch-less", -> 
  gulp.src "app/**/bootstrap-scoped.less"
  .pipe gulp.dest('.build') # file.relative== 'css/bootstrap-scoped.less' (note: 'css/' directory is present)
  return  

This is a contrived example just to show where the issue exists. In our gulp build, this result in files being written to the wrong directory.

Assignee
Assign to
Time tracking