1 Star 0 Fork 926

beyondpang/IBOS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gulpfile.js 1.00 KB
一键复制 编辑 原始数据 按行查看 历史
liuzimu 提交于 2017-12-05 09:42 . 更新开源版4.4.2
var gulp = require('gulp')
var watch = require('gulp-watch')
var clean = require('gulp-clean')
var connect = require('gulp-connect')
var browserSync = require('browser-sync');
var minimist = require('minimist')
var WATCH_PATH = 'system/modules/**/*.(js|css|gif|png|jpg|jpeg)'
var PHP_PATH = 'system/modules/**/*.php'
var CLEAN_PATH = 'static/!(css|font|image|js|login|office)'
function cleanStaticCache() {
console.log('clean and reload')
gulp.src(CLEAN_PATH)
.pipe(clean())
.pipe(connect.reload())
.pipe(browserSync.reload({stream:true}))
}
gulp.task('watch', function () {
return watch(WATCH_PATH, cleanStaticCache)
});
gulp.task('clean', cleanStaticCache);
gulp.task('connect', function() {
var options = minimist(process.argv.slice(2));
var host = options.host || 'ibos.cc'
var port = options.port || 8080
connect.server({
livereload: true
})
browserSync({
proxy: host,
port: port,
open: true,
notify: false
});
})
gulp.task('default', ['connect', 'watch'])
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/beyondpang/IBOS.git
git@gitee.com:beyondpang/IBOS.git
beyondpang
IBOS
IBOS
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385