Pavliko / postcss-svg

PostCSS plug-in which to insert inline SVG to CSS and allows you to manage it colors.
http://pavliko.github.io/postcss-svg/
Creative Commons Zero v1.0 Universal
124 stars 23 forks source link

TypeError: require.reload is not a function #14

Closed AndreyGrin closed 7 years ago

AndreyGrin commented 9 years ago

Using Gulp. I'm doing npm install postcss-svg --save-dev and next using your task. After starting have this error: TypeError: require.reload is not a function

In your github repo, I'm found reload.js, how include this?

senerdude commented 8 years ago

Here is the working version;

var gulp = require('gulp'),
    postcss = require('gulp-postcss'),
    postcsssvg = require('postcss-svg');

gulp.task('styles', function() {
  var postcssProcessors;
  postcssProcessors = [
    postcsssvg({ 
        defaults: '[fill]: green',
        paths : ['./img/']
    })
  ];
  gulp.src('css/src/*.css')
    .pipe(postcss(postcssProcessors))
    .pipe(gulp.dest('css/out/'));
});
jonathantneal commented 7 years ago

This is no longer part of v2