This repository has been archived by the owner on Nov 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using deployment vuejs when query '?debug=true'
update sw precache version,
- Loading branch information
Showing
10 changed files
with
85 additions
and
745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,68 @@ | ||
var gulp =require('gulp'); | ||
var gulp = require('gulp'); | ||
var stylus = require('gulp-stylus'); | ||
var plumber = require('gulp-plumber'); | ||
var strip = require('gulp-strip-debug'); | ||
var rename = require('gulp-rename'); | ||
var uglify = require('gulp-uglify'); | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
|
||
gulp.task('default',function(){ | ||
gulp.task('default', function () { | ||
console.log('default task'); | ||
|
||
}); | ||
|
||
|
||
gulp.task('watch',function(){ | ||
|
||
gulp.watch('./stylus/**/*',['stylus']); | ||
|
||
gulp.task('watch', function () { | ||
gulp.watch('./stylus/**/*', ['stylus']); | ||
gulp.watch('./public/js/index.js',['js:index']) | ||
}) | ||
gulp.task('stylus',function(){ | ||
return gulp.src('./stylus/**/*') | ||
.pipe(plumber()) | ||
.pipe(stylus()) | ||
.pipe(gulp.dest('./public/css')) | ||
gulp.task('stylus', function () { | ||
return gulp | ||
.src('./stylus/**/*') | ||
.pipe(plumber()) | ||
.pipe(sourcemaps.init()) | ||
.pipe(stylus({ | ||
compress:true, | ||
})) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('./public/css')) | ||
|
||
}) | ||
|
||
gulp.task('dep',['dep:vue','dep:semantic','dep:zepto']); | ||
gulp.task('js:index', function () { | ||
return gulp | ||
.src('./public/js/index.js') | ||
.pipe(strip()) | ||
.pipe(rename("index.min.js")) | ||
.pipe(uglify()) | ||
.pipe(gulp.dest('./public/js')) | ||
}); | ||
|
||
|
||
gulp.task('dep', ['dep:vue', 'dep:semantic', 'dep:zepto']); | ||
|
||
gulp.task('dep:vue',function(){ | ||
return gulp.src('node_modules/vue/dist/**/*') | ||
.pipe(gulp.dest('public/lib/vue')).on('error',function(e){ | ||
console.log(e); | ||
}); | ||
gulp.task('dep:vue', function () { | ||
return gulp | ||
.src('node_modules/vue/dist/**/*') | ||
.pipe(gulp.dest('public/lib/vue')) | ||
.on('error', function (e) { | ||
console.log(e); | ||
}); | ||
}) | ||
|
||
gulp.task('dep:semantic',function(){ | ||
return gulp.src('node_modules/semantic-ui/dist/**/*') | ||
.pipe(gulp.dest('public/lib/semantic-ui')).on('error',function(e){ | ||
console.log(e); | ||
}); | ||
gulp.task('dep:semantic', function () { | ||
return gulp | ||
.src('node_modules/semantic-ui/dist/**/*') | ||
.pipe(gulp.dest('public/lib/semantic-ui')) | ||
.on('error', function (e) { | ||
console.log(e); | ||
}); | ||
}) | ||
|
||
gulp.task('dep:zepto',function(){ | ||
return gulp.src('node_modules/zepto/dist/**/*') | ||
.pipe(gulp.dest('public/lib/zepto')).on('error',function(e){ | ||
console.log(e); | ||
}); | ||
gulp.task('dep:zepto', function () { | ||
return gulp | ||
.src('node_modules/zepto/dist/**/*') | ||
.pipe(gulp.dest('public/lib/zepto')) | ||
.on('error', function (e) { | ||
console.log(e); | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.