L
L
lavezzi12015-10-06 02:04:51
JavaScript
lavezzi1, 2015-10-06 02:04:51

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

4 answer(s)
L
LMI, 2015-10-06
@lavezzi1

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

Here is the complete code and documentation
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'));
});

https://www.npmjs.com/package/node-normalize-scss

V
Vladimir Buchatsky, 2016-07-22
@Nemisidis

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.

C
chz, 2015-10-06
@chz

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...

P
Pixilys, 2019-08-06
@Pixilys

The topic is dead. There was a merger with rezet. It got better (From my belfry)
https://github.com/ranjandatta/scss-resets

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question