1 Star 0 Fork 73

yzuzhang/admui

forked from guoruifeng/admui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gulpfile.js 2.72 KB
一键复制 编辑 原始数据 按行查看 历史
guoruifeng 提交于 2017-05-17 20:41 . 第一版提交
var gulp = require('gulp');
var less = require('gulp-less');
var concat = require('gulp-concat');
var csso = require('gulp-csso');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
gulp.task('less', function () {
return gulp.src(["src/less/AdmUI.less"])
.pipe(less())
.pipe(gulp.dest('./dist/css'))
.pipe(rename({suffix: '.min'}))
.pipe(csso())
.pipe(gulp.dest('dist/css'));
});
gulp.task('less:watch', function () {
gulp.watch('./**/*.less', ['less,lessApp']);
});
gulp.task('angularConcat', function () {
gulp.src([
'vendors/bower_components/angular/angular.min.js',
'vendors/bower_components/angular-animate/angular-animate.min.js',
'vendors/bower_components/angular-aria/angular-aria.min.js',
'vendors/bower_components/angular-route/angular-route.min.js',
'vendors/bower_components/angular-messages/angular-messages.min.js',
'vendors/bower_components/angular-material/angular-material.min.js',
'vendors/bower_components/oclazyload/dist/ocLazyLoad.min.js',
'vendors/bower_components/angular-loading-bar/build/loading-bar.min.js',
'vendors/angular-bootstrap/ui-bootstrap-custom-1.1.2.min.js',
'vendors/angular-bootstrap/ui-bootstrap-custom-tpls-1.1.2.min.js'
])
.pipe(concat('angular.js'))
.pipe(gulp.dest('dist/js'));
});
gulp.task('libsConcat', function () {
gulp.src([
'vendors/bower_components/jquery/dist/jquery.min.js',
'vendors/bower_components/bootstrap/dist/js/bootstrap.min.js',
'vendors/bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js',
'vendors/bower_components/JavaScript-MD5/js/md5.min.js',
'vendors/bower_components/jasny-bootstrap/js/fileinput.js',
'vendors/bower_components/moment/min/moment.min.js',
])
.pipe(concat('libs.js'))
.pipe(gulp.dest('dist/js'));
});
gulp.task('libsCssConcat', function () {
gulp.src([
'vendors/bower_components/angular-loading-bar/build/loading-bar.min.css',
'vendors/bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.min.css',
'vendors/bower_components/angular-material/angular-material.min.css',
'vendors/bower_components/animate.css/animate.css',
'vendors/bower_components/hint.css/hint.min.css',
'vendors/bower_components/material-design-iconic-font/dist/css/material-design-iconic-font.min.css'
])
.pipe(concat('libs.css'))
.pipe(gulp.dest('dist/css'));
});
gulp.task('default', ['less', 'libsCssConcat', 'angularConcat', 'libsConcat']);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yzuzhang/admui.git
git@gitee.com:yzuzhang/admui.git
yzuzhang
admui
admui
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385