Blame view

config/build-style.js 719 Bytes
4a7f28fd   Sergio Crisostomo   eslint and replac...
1
2
3
4
5
  const gulp = require('gulp');
  const cleanCSS = require('gulp-clean-css');
  const less = require('gulp-less');
  const rename = require('gulp-rename');
  const autoprefixer = require('gulp-autoprefixer');
7fa943eb   梁灏   init
6
  
c058dcb3   jingsam   clean style
7
8
  // 编译less
  gulp.task('css', function () {
b0893113   jingsam   :art: add eslint
9
10
11
      gulp.src('../src/styles/index.less')
          .pipe(less())
          .pipe(autoprefixer({
e2645048   jingsam   :fire: remove tra...
12
              browsers: ['last 2 versions', 'ie > 8']
b0893113   jingsam   :art: add eslint
13
14
15
          }))
          .pipe(cleanCSS())
          .pipe(rename('iview.css'))
333d7f85   other   update mew-iview
16
          .pipe(gulp.dest('../build/styles'));
7fa943eb   梁灏   init
17
18
  });
  
c058dcb3   jingsam   clean style
19
  // 拷贝字体文件
7fa943eb   梁灏   init
20
  gulp.task('fonts', function () {
4b05d84e   梁灏   Modify the direct...
21
      gulp.src('../src/styles/common/iconfont/fonts/*.*')
333d7f85   other   update mew-iview
22
          .pipe(gulp.dest('../build/styles/fonts'));
7fa943eb   梁灏   init
23
24
  });
  
c058dcb3   jingsam   clean style
25
  gulp.task('default', ['css', 'fonts']);