1 Star 0 Fork 105

tli123/plot4ol3

forked from ilocation/plot4ol3 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gulpfile.js 2.91 KB
一键复制 编辑 原始数据 按行查看 历史
ilocation 提交于 2016-03-12 09:26 . V 1.0
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var replace = require('gulp-replace');
var cssnano = require('gulp-cssnano');
gulp.task('compact-js', function () {
return gulp.src(['./lib/goog/base.js',
'./lib/goog/idisposable.js',
'./lib/goog/disposable.js',
'./lib/goog/eventid.js',
'./lib/goog/event.js',
'./lib/goog/error.js',
'./lib/goog/nodetype.js',
'./lib/goog/string.js',
'./lib/goog/asserts.js',
'./lib/goog/array.js',
'./lib/goog/object.js',
'./lib/goog/util.js',
'./lib/goog/browser.js',
'./lib/goog/engine.js',
'./lib/goog/reflect.js',
'./lib/goog/useragent.js',
'./lib/goog/eventtype.js',
'./lib/goog/browserfeature.js',
'./lib/goog/browserevent.js',
'./lib/goog/entrypointregistry.js',
'./lib/goog/listenable.js',
'./lib/goog/listener.js',
'./lib/goog/listenermap.js',
'./lib/goog/events.js',
'./src/gispace/GISpace.js',
'./src/gispace/Constants.js',
'./src/gispace/util/Utils.js',
'./src/gispace/util/DomUtils.js',
'./src/gispace/PlotTypes.js',
'./src/gispace/PlotUtils.js',
'./src/gispace/event/Event.js',
'./src/gispace/event/PlotDrawEvent.js',
'./src/gispace/plot/Plot.js',
'./src/gispace/plot/Arc.js',
'./src/gispace/plot/AttackArrow.js',
'./src/gispace/plot/SquadCombat.js',
'./src/gispace/plot/TailedAttackArrow.js',
'./src/gispace/plot/TailedSquadCombat.js',
'./src/gispace/plot/Circle.js',
'./src/gispace/plot/ClosedCurve.js',
'./src/gispace/plot/Curve.js',
'./src/gispace/plot/DoubleArrow.js',
'./src/gispace/plot/Ellipse.js',
'./src/gispace/plot/FineArrow.js',
'./src/gispace/plot/AssaultDirection.js',
'./src/gispace/plot/GatheringPlace.js',
'./src/gispace/plot/Lune.js',
'./src/gispace/plot/Sector.js',
'./src/gispace/plot/StraightArrow.js',
'./src/gispace/PlotFactory.js',
'./src/gispace/tool/PlotDraw.js',
'./src/gispace/tool/PlotEdit.js'])
.pipe(concat('p-ol3.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./build/'))
.pipe(gulp.dest('./sample/'));
});
gulp.task('compact-css', function(){
return gulp.src('src/*.css')
.pipe(concat('p-ol3.min.css'))
.pipe(gulp.dest('./build/'))
.pipe(gulp.dest('./sample/'))
.pipe(cssnano());
});
gulp.task('default', function () {
var jsWatch = gulp.watch('./src/**/*.js', ['compact-js']);
jsWatch.on('change', function (e) {
console.log('File ' + e.path + ' was ' + e.type + ', running compact js ...');
});
var cssWatch = gulp.watch('./src/*.css', ['compact-css']);
jsWatch.on('change', function (e) {
console.log('File ' + e.path + ' was ' + e.type + ', running compact css ...');
});
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qweert32/plot.git
git@gitee.com:qweert32/plot.git
qweert32
plot
plot4ol3
master

搜索帮助