D
D
denis26012017-03-05 12:30:27
css
denis2601, 2017-03-05 12:30:27

Gulp sourcemap not being created if mixins are included in .scss?

I am using this code:

var gulp  = require('gulp'),
    sass  = require('gulp-sass'),
    sourcemaps = require('gulp-sourcemaps'),

gulp.task('style', function() {
  gulp.src('assets/css/scss/style.scss')
    .pipe(sourcemaps.init())
    .pipe(sass())
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest('assets/css'));
});

Maps are created correctly, but there is a big BUT when I connect any files with impurities , like these:
@mixin make-col-ready($gutter: $grid-gutter-width) {
  position: relative;
  min-height: 1px;
  padding-right: ($gutter / 2);
  padding-left:  ($gutter / 2);
}
...
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
  $n: index($breakpoint-names, $name);
  @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
}
...
@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
  $min: breakpoint-min($name, $breakpoints);
  @if $min {
    @media (min-width: $min) {
      @content;
    }
  } @else {
    @content;
  }
}

then what happens is that on the command line it shows that the compilation has passed, but there are no changes, I remove the sourcemaps and everything immediately works well even with impurities.
Tell me where to dig, because in development I need maps, but I don’t want to switch to Koala ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2017-03-05
@denis2601

20170305-184113.png
Is that what you call compilation passed ?
Here is the working assembly https://yadi.sk/d/AIdG1A4T3F5KUk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question