Gulp -autoprefixer does not compile CSS3

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 to be configured correctly. My main sass file is located at sass / screen.scss. I'm not sure why I have to update src, where to look, as it is already installed in the sass pipe.

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

In both cases, this is not like autoprefixer compiling screen.css.

In my .scss, I have some transitions, transforms and shadows, such as:

 .shadow { box-shadow: #000 5px 5px 5px; } 
0
source share
1 answer

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

0
source

Source: https://habr.com/ru/post/981361/


All Articles