Blame view

build/build-style.js 717 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
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']);