0

In my gulpfile.js

gulp.task('sass', function() {
  return gulp.src('sass/screen.scss')
    .pipe(sass())
    .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
    .pipe(gulp.dest('/'));
});

gulp.task('watch', function() {
    gulp.watch( 'sass/**/*.scss', ['sass'] );
});

1) Everything seems set up correctly. My main sass file is located at sass/screen.scss. I'm not sure why I have to redeclare the src of where to watch since that's already being established in the sass pipe.

2) I'm not sure if I have my autoprefixer setup correctly or what the exact arguments mean. For example, 'last 2 version' refers to safari 5, 4.9, 4.8? I can't find documentation on this.

In both cases, it doesn't seem like the autoprefixer is compiling to screen.css.

In my .scss I have some transitions, transformations, and box-shadows such as:

.shadow {
    box-shadow: #000 5px 5px 5px;
}
AlxVallejo
  • 3,066
  • 6
  • 50
  • 74

1 Answers1

0

It looks like you need to change your destination filename. Where do you want the compiled css to end up? If you want it in the current directory in a file named screen.css, then change gulp.dest('/') to gulp.dest('screen.css').

Ben
  • 10,056
  • 5
  • 41
  • 42