Skip to content

Commit

Permalink
WA代码:添加 gulpfile.js 分段注释
Browse files Browse the repository at this point in the history
  • Loading branch information
amio committed Feb 25, 2014
1 parent db6051c commit 62f13c5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ var tinylr = require('tiny-lr');
var connectlr = require('connect-livereload');
var open = require('open');

/**************************************
* Launch Local Servers
*/

var LIVERELOAD_PORT = 35729;
var EXPRESS_PORT = 9999;
var SOURCE_ROOT = __dirname + '/app';
Expand Down Expand Up @@ -56,6 +60,10 @@ gulp.task('serverdist', function () {
open('http://localhost:9999');
});

/**************************************
* Building Works
*/

//var sass = require('gulp-ruby-sass');
//var jshint = require('gulp-jshint');

Expand All @@ -77,7 +85,7 @@ gulp.task('usemin', function () {
.pipe(gulp.dest('./dist/'));
});

gulp.task('imagemin', function(){
gulp.task('imagemin', function () {
gulp.src(SOURCE_ROOT + '/images/*.*', {base: SOURCE_ROOT})
.pipe(imagemin())
.pipe(gulp.dest(BUILD_ROOT));
Expand Down Expand Up @@ -110,6 +118,10 @@ gulp.task('build', ['clean'], function () {
gulp.start('usemin', 'imagemin', 'copy');
});

/**************************************
* Distribution
*/

var sh = function (commands) {
var exec = require('child_process').exec;
var sys = require('sys');
Expand All @@ -130,4 +142,8 @@ gulp.task('dist', function () {
+ ' -avz -e ssh --delete --exclude=.git* --exclude=*.scss --exclude=node_modules');
});

/**************************************
* General Tasks
*/

gulp.task('default', ['serverdev']);

0 comments on commit 62f13c5

Please sign in to comment.