mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(bower) philip v1.3.0
This commit is contained in:
parent
ae62423fe0
commit
1d8998a133
7 changed files with 45 additions and 24 deletions
|
|
@ -30,6 +30,6 @@
|
|||
"vk-openapi": "~0.0.1",
|
||||
"domtokenlist-shim": "~1.1.0",
|
||||
"promise-polyfill": "~2.1.0",
|
||||
"philip": "~1.2.1"
|
||||
"philip": "~1.3.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "philip",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.0",
|
||||
"homepage": "https://github.com/coderaiser/domfs-philip",
|
||||
"authors": [
|
||||
"coderaiser <mnemonic.enemy@gmail.com>"
|
||||
|
|
@ -26,14 +26,14 @@
|
|||
"findit": "~1.1.0",
|
||||
"execon": "~1.2.2"
|
||||
},
|
||||
"_release": "1.2.1",
|
||||
"_release": "1.3.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.2.1",
|
||||
"commit": "21c81406c74cfe0bba678c2a5b91bbf628756e5b"
|
||||
"tag": "v1.3.0",
|
||||
"commit": "103d5c3cc2fdd8d2857b003e52bc3c4cead207d7"
|
||||
},
|
||||
"_source": "git://github.com/coderaiser/domfs-philip.git",
|
||||
"_target": "~1.2.1",
|
||||
"_target": "~1.3.0",
|
||||
"_originalSource": "philip",
|
||||
"_direct": true
|
||||
}
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
2015.07.20, v1.3.0
|
||||
|
||||
feature:
|
||||
- (philip) add optional parameters to processingFn: i, n
|
||||
|
||||
|
||||
2015.07.19, v1.2.1
|
||||
|
||||
fix:
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Or any other node-compitable [EventEmitter](https://iojs.org/api/events.html "Ev
|
|||
|
||||
entry = item.webkitGetAsEntry();
|
||||
|
||||
upload = philip(entry, function(type, name, data, callback) {
|
||||
upload = philip(entry, function(type, name, data/*, i, n,*/, callback) {
|
||||
var error = null;
|
||||
|
||||
switch(type) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "philip",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.0",
|
||||
"homepage": "https://github.com/coderaiser/domfs-philip",
|
||||
"authors": [
|
||||
"coderaiser <mnemonic.enemy@gmail.com>"
|
||||
|
|
|
|||
|
|
@ -50,11 +50,24 @@
|
|||
}
|
||||
|
||||
Philip.prototype._process = function() {
|
||||
var el,
|
||||
var args,
|
||||
argsLength = this._processingFn.length,
|
||||
el,
|
||||
data,
|
||||
self = this,
|
||||
name = self._dirs.shift(),
|
||||
type = 'directory';
|
||||
self = this,
|
||||
name = self._dirs.shift(),
|
||||
type = 'directory',
|
||||
fn = function(error) {
|
||||
++self._i;
|
||||
|
||||
if (error) {
|
||||
self.emit('error', error);
|
||||
self.pause();
|
||||
}
|
||||
|
||||
self._process();
|
||||
self._progress();
|
||||
};
|
||||
|
||||
if (!name) {
|
||||
type = 'file';
|
||||
|
|
@ -69,17 +82,19 @@
|
|||
if (!name) {
|
||||
self.emit('end');
|
||||
} else if (!this._pause) {
|
||||
self._processingFn(type, name, data, function(error) {
|
||||
++self._i;
|
||||
|
||||
if (error) {
|
||||
self.emit('error', error);
|
||||
self.pause();
|
||||
}
|
||||
|
||||
self._process();
|
||||
self._progress();
|
||||
});
|
||||
switch(argsLength) {
|
||||
default:
|
||||
args = [type, name, data];
|
||||
break;
|
||||
|
||||
case 6:
|
||||
args = [type, name, data, this._i, this._n];
|
||||
break;
|
||||
}
|
||||
|
||||
args.push(fn);
|
||||
|
||||
self._processingFn.apply(null, args);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "philip",
|
||||
"private": true,
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.0",
|
||||
"description": "Process files and directories in DOM File System",
|
||||
"main": "lib/philip.js",
|
||||
"dependencies": {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue