Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Relative path stripping #27

Closed
ghost opened this issue Feb 28, 2014 · 2 comments
Closed

Relative path stripping #27

ghost opened this issue Feb 28, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 28, 2014

Hi ;

I think we've got some relative path stripping issue.

I have to work on that kind of file structure:

/Styles
/Styles/FR
/Styles/FR/FRA
/Styles/FR/FRA/style1
/Styles/FR/FRA/style1/Content
/Styles/FR/FRA/style1/Content/style1.scss
/Styles/FR/FRA/style2
/Styles/FR/FRA/style2/Content
/Styles/FR/FRA/style2/Content/style2.scss
[...]

I want to directly process the .scss files to ouput the .css in the same directory, avoiding :

.pipe(gulp.dest('dist')) 

My gulpfile.js is run from the root /:

gulp.task('css', function() {
    return gulp.src('Styles/FR/FRA/**/*.scss')
    .pipe(sass())
    .pipe(gulp.dest('Styles/FR/FRA'))
    .pipe(debug());
});

I guess it should results as :

[...]
/Styles/FR/FRA/style2/Content/style2.scss
/Styles/FR/FRA/style2/Content/style2.css

However, instead of keeping my file structure, it outputs:

[...]
/Styles/FR/FRA/style2/Content/style2.scss
/Styles/FR/FRA/style2.css

Which is kind of tricky to handle, as I've hundreds of scss files I don't want to concatenate.

Any fix please?

@ghost
Copy link
Author

ghost commented Feb 28, 2014

I also tried :

  • gulp.dest('Styles/FR/FRA/') // outputs CSS directly in the FRA/ root
  • gulp.dest('Styles/FR/FRA') // outputs CSS directly in the FRA/ root
  • gulp.dest('Styles/FR/FRA/**/*') // crashes
  • gulp.dest('Styles/FR/FRA/**') // crashes
  • gulp.dest('Styles/FR/FRA/*') // crashes
  • gulp.dest('.') // outputs CSS in the / root
  • gulp.dest('./') // outputs CSS in the / root

@sindresorhus
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant