Answer the question
In order to leave comments, you need to log in
How to make friends postcss and scss?
I want to make friends postcss and scss. Specifically interested in the work of cssnext.io and scss together.
I use gulp to build. There is a build.scss file that includes all the necessary files:
/* ---------------------- */
/* == Base
/* ---------------------- */
@import "base/_settings.scss";
@import "base/_mixins.scss";
@import "base/_base.scss";
@import "base/reset.min";
@import "base/main.scss";
/* ---------------------- */
/* == States
/* ---------------------- */
@import "states/abstract.scss";
/* ---------------------- */
/* == Layouts
/* ---------------------- */
@import "layouts/header.scss";
@import "layouts/footer.scss";
...
gulp.task('styles:build', function(callback) {
return gulp.src(params.src.style)
.pipe(sourcemaps.init())
.pipe(postcss([
cssnext
// plugins
], { syntax: syntax }))
.pipe(rename("styles.css"))
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(params.build.dev.css));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question