Ejemplo n.º 1
0
gulp.task('build:css', function () {
    gulp.src(path.src.style)

        .pipe(rigger())

        .pipe( postcss([
            precss,
            brandcolors,
            lost,
            postcssSVG({
                paths: ['src/i/'],
            }),
            fontmagician,
            postcssShort,
            postcssCenter,
            postcssfocus,
            easings,
            flexfix,
            autoprefixer({ browsers: ['last 2 versions'] }),
            mqpacker,
            csso
        ]))

        .pipe(gulp.dest(path.build.css))

        .pipe(reload({stream: true}));
});
Ejemplo n.º 2
0
gulp.task('sass', function() {
  var postcssProcessors;
  postcssSVG = require('postcss-svg');
  postcssProcessors = [
    postcssSVG({
      //defaults: '[fill]: black',
      paths: [appConfig.theme + 'images/'],
   })
  ];
 return gulp.src(appConfig.theme + 'sass/**/*.scss')
    .pipe(sassGlob())
    .pipe($.plumber())
    .pipe($.sourcemaps.init())
    .pipe($.sass.sync({ // Passes it through a gulp-sass
      /* include sass from the bower_components folder */
      includePaths: ['bower_components']
      //errLogToConsole: true
    }))
    .pipe($.autoprefixer({
      browsers: ['last 3 versions', 'ie 9']
    }))
    .pipe(postcss(postcssProcessors))
    .pipe($.cssnano())
    .pipe($.sourcemaps.write('.'))
    .pipe(gulp.dest(appConfig.theme + 'css'))
    .pipe(browserSync.reload({
      stream: true
    }));
});