From 85fcbdb12bb817b8b701aa691c9d354faec4648f Mon Sep 17 00:00:00 2001 From: Jan Kuri Date: Fri, 30 Dec 2016 13:24:38 +0100 Subject: [PATCH] chore: cleanup --- package.json | 92 ++++++++++++++++++------------------ scripts/clean.sh | 2 +- src/services/ngx-uploader.ts | 6 +-- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index 7725531c..5acdfdce 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,47 @@ { - "name": "ngx-uploader", - "description": "Angular File Uploader", - "version": "2.0.4", - "license": "MIT", - "main": "index.js", - "typings": "index.d.ts", - "author": "Jan Kuri ", - "scripts": { - "clean": "./scripts/clean.sh", - "dev": "tsc --watch", - "build": "./node_modules/.bin/ngc -p tsconfig.json", - "prepublish": "npm run build", - "docs": "gulp docs", - "changelog": "gulp changelog" - }, - "repository": { - "type": "git", - "url": "https://github.com/jkuri/ngx-uploader.git" - }, - "keywords": [ - "ngx", - "angular", - "file", - "upload", - "uploader" - ], - "devDependencies": { - "@angular/common": "^2.4.1", - "@angular/compiler": "^2.4.1", - "@angular/compiler-cli": "^2.4.1", - "@angular/core": "^2.4.1", - "@angular/platform-browser": "^2.4.1", - "@angular/platform-browser-dynamic": "^2.4.1", - "@angular/platform-server": "^2.4.1", - "@types/core-js": "^0.9.35", - "@types/node": "^6.0.52", - "gulp": "^3.9.1", - "gulp-conventional-changelog": "^1.1.0", - "gulp-typedoc": "^2.0.1", - "reflect-metadata": "^0.1.9", - "rxjs": "5.0.1", - "typedoc": "^0.5.1", - "typescript": "2.0.10", - "zone.js": "^0.7.4" - } -} \ No newline at end of file + "name": "ngx-uploader", + "description": "Angular File Uploader", + "version": "2.0.4", + "license": "MIT", + "main": "index.js", + "typings": "index.d.ts", + "author": "Jan Kuri ", + "scripts": { + "clean": "./scripts/clean.sh", + "dev": "tsc --watch", + "build": "./node_modules/.bin/ngc -p tsconfig.json", + "prepublish": "npm run build", + "docs": "gulp docs", + "changelog": "gulp changelog" + }, + "repository": { + "type": "git", + "url": "https://github.com/jkuri/ngx-uploader.git" + }, + "keywords": [ + "ngx", + "angular", + "file", + "upload", + "uploader" + ], + "devDependencies": { + "@angular/common": "^2.4.1", + "@angular/compiler": "^2.4.1", + "@angular/compiler-cli": "^2.4.1", + "@angular/core": "^2.4.1", + "@angular/platform-browser": "^2.4.1", + "@angular/platform-browser-dynamic": "^2.4.1", + "@angular/platform-server": "^2.4.1", + "@types/core-js": "^0.9.35", + "@types/node": "^6.0.52", + "gulp": "^3.9.1", + "gulp-conventional-changelog": "^1.1.0", + "gulp-typedoc": "^2.0.1", + "reflect-metadata": "^0.1.9", + "rxjs": "5.0.1", + "typedoc": "^0.5.1", + "typescript": "2.0.10", + "zone.js": "^0.7.4" + } +} diff --git a/scripts/clean.sh b/scripts/clean.sh index 502fe374..9da25ba4 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -find . -name "*.js" -type f -not -path "./node_modules/*" -delete +find . -name "*.js" -type f -and -not -path "./node_modules/*" -and -not -path "./gulpfile.js" -delete find . -name "*.js.map" -type f -not -path "./node_modules/*" -delete find . -name "*.d.ts" -type f -not -path "./node_modules/*" -delete find . -name "*.metadata.json" -type f -not -path "./node_modules/*" -delete diff --git a/src/services/ngx-uploader.ts b/src/services/ngx-uploader.ts index 7318dc7e..c3de231d 100644 --- a/src/services/ngx-uploader.ts +++ b/src/services/ngx-uploader.ts @@ -23,9 +23,9 @@ export class NgUploaderService { } uploadFilesInQueue(): void { - let newFiles = this._queue.filter((f) => { return !f.uploading; }); - newFiles.forEach((f) => { - this.uploadFile(f); + this._queue.forEach((file) => { + if (file.uploading) { return; } + this.uploadFile(file); }); };