Gulp Little Pit One

Source: Internet
Author: User

When learning Gulp, see a lot of people write

gulp.task (' Styles ', function () {return gulp.src (' src/styles/main.scss '). Pipe (Sass ({style: ' expanded '}). Pipe (Autoprefixer    (' last 2 version ', ' Safari 5 ', ' IE 8 ', ' IE 9 ', ' Opera 12.1 ', ' iOS 6 ', ' Android 4 ') . Pipe (Gulp.dest (' dist/assets/css ')). Pipe (rename ({suffix: '. Min ')). Pipe (Minifycss ()). Pipe (Gulp.dest (' Dist/asse Ts/css '). Pipe (notify ({message: ' Styles task Complete ');}); 

After trying to find an error, the path must be a string, but I did not write wrong, after trying a variety of,

Https://www.npmjs.com/package/gulp-ruby-sass

Found on the official website, Gulp-ruby-sass version 1.x

 Gulp-ruby-sass is a gulp source adapter. Use it instead of GULP.SRC. 

Looked at its own version of the package, the original is 1.x

//gulp-ruby-sass:1.xgulp.task (' sass ', function () {return sass (' path/to /scss ', {style: ' expanded '}). Pipe (Gulp.dest (' path/to/css ');}); 

You can use it in this case

Gulp small pits one

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.