Gulp postcss丢失了网格系统 - 框架

时间:2016-02-15 16:43:18

标签: sass grid gulp postcss

我有一个安装了lost软件包的gulp文件,但是在运行我的任务时似乎没有正确编译css。

var gulp = require('gulp'),
    $ = require('gulp-load-plugins')({ lazy: true }),
    browsersync = require('browser-sync'),
    del = require('del'),
    config = require('./config.js')(),
    plumber = require('gulp-plumber'),
    newer = require('gulp-newer'),
    jshint = require('gulp-jshint'),
    jade = require('gulp-jade'),
    concat = require('gulp-concat'),
    size = require('gulp-size'),
    uglify = require('gulp-uglify'),
    deporder = require('gulp-deporder'),
    stripDebug = require('gulp-strip-debug'),
    postcss = require('gulp-postcss'),
    autoprefixer = require('autoprefixer'),
    lost = require('lost'),
    minifyCss = require('gulp-minify-css'),
    sass = require('gulp-ruby-sass'),
    sourcemaps = require('gulp-sourcemaps');

我的gulp任务如下:

gulp.task('sass', function () {

  var processors = [
    lost(),
    autoprefixer({browsers:['last 2 versions']})
  ];
  return gulp.src(styles.in)
      .pipe($.plumber())
      .pipe(postcss(processors))
      .pipe($.sass(styles.sassOpt))
      .pipe($.size({ title: 'styles In Size' }))
      .pipe($.size({ title: 'styles Out Size' }))
      .pipe(gulp.dest(styles.out))
      .pipe(browsersync.reload({ stream: true }));
  log('-> Compile SASS Styles')
});

非常感谢帮助, 非常感谢你提前!

修改 CSS输出不是预期的。 例如,CSS呈现为:     .grid一         lost-utility:clearfix         与:100%     DIV         丢失列:1/6

1 个答案:

答案 0 :(得分:0)

愚蠢的错误我的postcss任务正在观看.sass文件而不是.css ...