1 Star 0 Fork 6

fork-code/js-log

forked from 明道/js-log 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gulpfile.js 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
plumber = require('gulp-plumber'),
jshint = require('gulp-jshint');
gulp.task('dist-src-js', function () {
gulp.src('src/**/*.js')
.pipe(plumber()).pipe(uglify()).pipe(rename({suffix: '.min'})).pipe(gulp.dest('dist'));
});
gulp.task('test-bower', function () {
gulp.src('bower_components/jquery/dist/jquery.min.js')
.pipe(plumber()).pipe(gulp.dest('test/lib/jquery/'));
gulp.src('bower_components/json2/**/*.js')
.pipe(plumber()).pipe(gulp.dest('dist/lib/json2/'));
});
gulp.task('src-jshint', function () {
gulp.src('src/**.js')
.pipe(plumber())
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('default'));
});
gulp.task('default', ['src-jshint', 'dist-src-js'], function () {
});
gulp.task('test', ['default', 'test-bower'], function () {
});
gulp.task('watch', ['default'], function () {
gulp.watch('src/**/*.js', ['dist-src-js']);
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/fork-code/js-log.git
git@gitee.com:fork-code/js-log.git
fork-code
js-log
js-log
master

搜索帮助