Permalink
Browse files

修改gulpfile.js

  • Loading branch information...
1 parent f84f1ae commit f0e807d04781294ba998507222816189142976be @zengyue zengyue committed Apr 12, 2014
Showing with 56 additions and 51 deletions.
  1. +1 −1 assets/bs3/css/dpl-min.css
  2. +1 −1 assets/bs3/css/dpl.css
  3. +7 −7 assets/bs3/gulpfile.js
  4. +25 −11 build/uploader.js
  5. +1 −7 gulpfile.js
  6. +21 −24 src/uploader/gulpfile.js
Oops, something went wrong.
@@ -4168,7 +4168,7 @@ form h3 {
}
@keyframes progress-bar-stripes {
from {
- background-position: 20px 0;
+ background-position: 40px 0;
}
to {
background-position: 0 0;
@@ -7,28 +7,28 @@ var minifyCSS = require('gulp-minify-css');
var rename = require('gulp-rename');
gulp.task('prepare', function() {
- return gulp.src('./assets/bs3/css', {read: false})
+ return gulp.src('./css', {read: false})
.pipe(clean());
});
gulp.task('less', function(){
return gulp.src([
- './assets/bs3/less/dpl.less',
- './assets/bs3/less/bui.less'
+ './less/dpl.less',
+ './less/bui.less'
])
.pipe(less())
- .pipe(gulp.dest('./assets/bs3/css'));
+ .pipe(gulp.dest('./css'));
});
gulp.task('minify-css',['less'], function() {
- return gulp.src('./assets/bs3/css/**.css')
+ return gulp.src('./css/**.css')
.pipe(minifyCSS())
.pipe(rename({suffix: '-min'}))
- .pipe(gulp.dest('./assets/bs3/css'));
+ .pipe(gulp.dest('./css'));
});
gulp.task('watch', function(){
- gulp.watch('./assets/bs3/less/**/*.less', ['less']);
+ gulp.watch('./less/**/*.less', ['less']);
});
gulp.task('default',['prepare'], function(){
View
@@ -122,6 +122,7 @@ define('bui/uploader/button/swfButton/ajbridge',['bui/common','bui/swf'], functi
* 20130904 从kissy ajbridge模块移植成bui的模块(索丘修改)
* @ignore
*/
+
define('bui/uploader/button/filter',['bui/common'], function(require){
var BUI = require('bui/common');
@@ -220,7 +221,8 @@ define('bui/uploader/button/filter',['bui/common'], function(require){
return type.join(',');
}
}
-});/**
+});
+/**
* @ignore
* @fileoverview 文件上传按钮的基类
* @author: 索丘 zengyue.yezy@alibaba-inc.com
@@ -448,6 +450,7 @@ define('bui/uploader/button/base', ['bui/common', './filter'], function(require)
return Button;
});
+
/**
* @ignore
* @fileoverview 文件上传按钮,使用input[type=file]
@@ -620,6 +623,7 @@ define('bui/uploader/button/htmlButton', ['bui/uploader/button/base'], function(
return HtmlButton;
});
+
/**
* @ignore
* @fileoverview flash上传按钮
@@ -775,7 +779,8 @@ define('bui/uploader/button/swfButton',['bui/common', './base','./swfButton/ajbr
});
return SwfButton;
-});/**
+});
+/**
* @fileoverview 上传方式类的基类
* @ignore
**/
@@ -912,7 +917,8 @@ define('bui/uploader/type/base',['bui/common'], function(require) {
});
return UploadType;
-});/**
+});
+/**
* @fileoverview ajax方案上传
* @author
* @ignore
@@ -1083,7 +1089,8 @@ define('bui/uploader/type/ajax', ['./base'], function(require) {
}
});
return AjaxType;
-});/**
+});
+/**
* @ignore
* @fileoverview flash上传方案
* @author
@@ -1279,7 +1286,8 @@ define('bui/uploader/type/flash',['./base'], function (require) {
}
}});
return FlashType;
-});/**
+});
+/**
* @fileoverview iframe方案上传
* @ignore
**/
@@ -1508,7 +1516,8 @@ define('bui/uploader/type/iframe',['./base'], function(require) {
}});
return IframeType;
-});/**
+});
+/**
* @ignore
* @fileoverview 文件上传队列列表显示和处理
* @author 索丘 <zengyue.yezy@alibaba-inc.com>
@@ -1663,7 +1672,8 @@ define('bui/uploader/queue', ['bui/common', 'bui/list'], function (require) {
});
return Queue;
-});/**
+});
+/**
* @ignore
* @fileoverview 文件上传主题的处理
* @author 索丘 <zengyue.yezy@alibaba-inc.com>
@@ -1743,7 +1753,8 @@ define('bui/uploader/theme',['bui/common'], function (require) {
return Theme;
-});/**
+});
+/**
* @ignore
* @fileoverview 异步文件上传的验证器
* @author 索丘 zengyue.yezy@alibaba-inc.com
@@ -1886,7 +1897,8 @@ define('bui/uploader/validator',['bui/common'], function (require) {
return Validator;
-});/**
+});
+/**
* @fileoverview 文件上传的工厂类
* @author 索丘 <zengyue.yezy@alibaba-inc.com>
* @ignore
@@ -1952,7 +1964,8 @@ define('bui/uploader/factory',['bui/common', './queue', './button/htmlButton', '
return new Factory();
-});/**
+});
+/**
* @ignore
* @fileoverview 异步文件上传组件
* @author 索丘 zengyue.yezy@alibaba-inc.com
@@ -2583,7 +2596,8 @@ define('bui/uploader/uploader', ['bui/common', './theme', './factory', './valida
return Uploader;
-});/**
+});
+/**
* @fileoverview 异步文件上传组件入口文件
* @author 索丘 zengyue.yezy@alibaba-inc.com
* @ignore
View
@@ -13,31 +13,25 @@ var through = require('through2');
var spawn = require('child_process').spawn;
-// Plugin level function(dealing with files)
+//执行子任务
function subTask() {
-
// Creating a stream through which each file will pass
var stream = through.obj(function(file, enc, callback) {
//src 必须使用{read: false}
if (file.isNull()) {
-
var task = spawn('gulp', ['--gulpfile', file.path]);
task.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});
task.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
-
task.on('close', function (code) {
console.log('child process exited with code ' + code);
});
- // Do nothing if no contents
}
- //this.push(file);
return callback();
-
});
// returning the file stream
@@ -10,39 +10,36 @@ var minifyCSS = require('gulp-minify-css');
var n2a = require('gulp-native2ascii');
var chug = require( 'gulp-chug' );
-
-var desDir = './build';
-
-gulp.task('prepare', function() {
- gulp.src('./build/uploader.js')
- .pipe(clean());
-});
+// gulp.task('prepare', function() {
+// gulp.src('./build/uploader.js')
+// .pipe(clean());
+// });
//合并js
gulp.task('uploader.js', function(){
gulp.src([
- './src/uploader/button/ajbridge.js',
- './src/uploader/button/filter.js',
- './src/uploader/button/base.js',
- './src/uploader/button/htmlButton.js',
- './src/uploader/button/swfButton.js',
- './src/uploader/type/base.js',
- './src/uploader/type/ajax.js',
- './src/uploader/type/flash.js',
- './src/uploader/type/iframe.js',
- './src/uploader/queue.js',
- './src/uploader/theme.js',
- './src/uploader/validator.js',
- './src/uploader/factory.js',
- './src/uploader/uploader.js',
- './src/uploader/base.js'
+ './button/ajbridge.js',
+ './button/filter.js',
+ './button/base.js',
+ './button/htmlButton.js',
+ './button/swfButton.js',
+ './type/base.js',
+ './type/ajax.js',
+ './type/flash.js',
+ './type/iframe.js',
+ './queue.js',
+ './theme.js',
+ './validator.js',
+ './factory.js',
+ './uploader.js',
+ './base.js'
]).pipe(concat('uploader.js'))
- .pipe(gulp.dest(desDir));
+ .pipe(gulp.dest('../../build'));
});
// 默认任务
-gulp.task('default', ['prepare'], function() {
+gulp.task('default', function() {
gulp.start('uploader.js');
});

0 comments on commit f0e807d

Please sign in to comment.