Answer the question
In order to leave comments, you need to log in
How to use normalize with gulp?
https://github.com/appleboy/normalize.scss
Decided to install normilize.scss via npm. Installed. What needs to be done next? How to import it into files then?
Answer the question
In order to leave comments, you need to log in
1. If you already have Gulp installed and configured locally in the project folder, then in the console you go to the folder of this project of yours and enter npm install node-normalize-scss --save-dev
2. Then in the main sass file you do import @import "normalize";
3. In the task of compiling sass to css, add a line of code to the pipe
includePaths: require('node-normalize-scss').includePaths
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
gulp.src('path/to/input.scss')
.pipe(sass({
// includePaths: require('node-normalize-scss').with('other/path', 'another/path')
// - or -
includePaths: require('node-normalize-scss').includePaths
}))
.pipe(gulp.dest('path/to/output.css'));
});
you don’t need to connect it, with the right settings, it will simply compile the rules into our CSS, although it’s easier for me to just create a _reset and pull the Normalize rules there.
Include the generated css I guess:
You can also look at the one provided in the test.html repo: https://github.com/appleboy/normalize.scss/blob/ma...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question