Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid sharing _options across multiple streams #69

Merged
merged 2 commits into from
Apr 23, 2019

Conversation

troter
Copy link
Contributor

@troter troter commented Feb 22, 2019

node: v8.15.0.

Before this commit, variable _options is sharing multiple streams.
It causes problems. _options.rebaseTo that was always set first is used.

If we have below files and gulpfile.js, rebaseTo was always <PROJECT_ROOT>/scss/entries/lp/lp1/css, and never <PROJECT_ROOT/scss/entries/lp/lp2/subpage/css>

scss/entries/lp/lp1/css/index.scss
scss/entries/lp/lp2/subpage/css/index.scss

gulp
  .src('scss/entries/**/*.scss')
  .pipe(plumber())
  .pipe(sass())
  .pipe(cleanCSS()) // rebaseTo always 'scss/entries/apps/app1/css/',
  .pipe(gulp.dest('public/'));

EDIT: This changes breaks backwards compatibility.

troter and others added 2 commits February 22, 2019 16:13
Before this commit, variable _options is sharing multiple streams.
It causes problems. _options.rebaseTo that was always set first is used.

If we have below files and gulpfile.js, rebaseTo was always `<PROJECT_ROOT>/scss/entries/lp/lp1/css`, and never `<PROJECT_ROOT/scss/entries/lp/lp2/subpage/css>`

```
scss/entries/lp/lp1/css/index.scss
scss/entries/lp/lp2/subpage/css/index.scss

gulp
  .src('scss/entries/**/*.scss')
  .pipe(plumber())
  .pipe(sass())
  .pipe(cleanCSS()) // rebaseTo always 'scss/entries/apps/app1/css/',
  .pipe(gulp.dest('public/'));
```
@scniro scniro merged commit 7296d35 into scniro:master Apr 23, 2019
@scniro
Copy link
Owner

scniro commented Apr 23, 2019

@troter nice! Now available in the 4.2.0 release

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

Successfully merging this pull request may close these issues.

2 participants