Blame view

build/build-style.js 707 Bytes
7fa943eb   梁灏   init
1
  var gulp = require('gulp');
e2645048   jingsam   :fire: remove tra...
2
  var cleanCSS = require('gulp-clean-css');
7fa943eb   梁灏   init
3
4
  var less = require('gulp-less');
  var rename = require('gulp-rename');
c058dcb3   jingsam   clean style
5
  var 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
16
          }))
          .pipe(cleanCSS())
          .pipe(rename('iview.css'))
          .pipe(gulp.dest('../dist/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/*.*')
b0893113   jingsam   :art: add eslint
22
          .pipe(gulp.dest('../dist/styles/fonts'));
7fa943eb   梁灏   init
23
24
  });
  
c058dcb3   jingsam   clean style
25
  gulp.task('default', ['css', 'fonts']);