From 78aa2b0b5bf91ce00b44fb1caed005f0a76cf96a Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 22:35:47 +0200 Subject: [PATCH 01/10] toastr version update --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b4f87c5..f420a87 100644 --- a/package.json +++ b/package.json @@ -60,11 +60,11 @@ "angular-messages": "github:angular/bower-angular-messages@^1.4.3", "angular-resource": "github:angular/bower-angular-resource@^1.4.3", "angular-sanitize": "github:angular/bower-angular-sanitize@^1.4.3", - "angular-toastr": "github:Foxandxss/angular-toastr@^1.4.1", + "angular-toastr": "github:Foxandxss/angular-toastr@^1.5.0", "angular-translate": "github:angular-translate/bower-angular-translate@^2.7.2", "angular-translate-loader-static-files": "github:angular-translate/bower-angular-translate-loader-static-files@^2.7.2", "angular-translate-loader-url": "github:angular-translate/bower-angular-translate-loader-url@^2.7.2", - "angular-ui-bootstrap": "github:angular-ui/bootstrap@^0.13.2", + "angular-ui-bootstrtoastrap": "github:angular-ui/bootstrap@^0.13.2", "angular-ui-router": "github:angular-ui/ui-router@^0.2.15", "bootstrap": "github:twbs/bootstrap@^3.3.5", "clean-css": "npm:clean-css@^3.3.8", From 2311a1f661088695438c77284ebcc3cb8e196e96 Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 22:36:16 +0200 Subject: [PATCH 02/10] toastr version update - ups --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f420a87..93699aa 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "angular-translate": "github:angular-translate/bower-angular-translate@^2.7.2", "angular-translate-loader-static-files": "github:angular-translate/bower-angular-translate-loader-static-files@^2.7.2", "angular-translate-loader-url": "github:angular-translate/bower-angular-translate-loader-url@^2.7.2", - "angular-ui-bootstrtoastrap": "github:angular-ui/bootstrap@^0.13.2", + "angular-ui-bootstrap": "github:angular-ui/bootstrap@^0.13.2", "angular-ui-router": "github:angular-ui/ui-router@^0.2.15", "bootstrap": "github:twbs/bootstrap@^3.3.5", "clean-css": "npm:clean-css@^3.3.8", From ee39f2657324d7dbd0e35b2a3b32456230c98d3f Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:14:52 +0200 Subject: [PATCH 03/10] gulp tasks upgrade to node 4.x --- package.json | 2 +- tasks/build.js | 30 +++++++++++++++--------------- tasks/clean.js | 8 ++++---- tasks/compile.js | 15 +++++++-------- tasks/default.js | 10 +++++----- tasks/e2e.js | 8 ++++---- tasks/jshint.js | 18 +++++++++--------- tasks/ngannotate.js | 8 ++++---- tasks/ngdirectives.js | 8 ++++---- tasks/server.js | 12 ++++++------ tasks/test.js | 8 ++++---- tasks/tslint.js | 8 ++++---- tasks/typedoc.js | 14 +++++++------- 13 files changed, 74 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 93699aa..75d2510 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "typescript": "^1.6.2" }, "engines": { - "node": ">=0.12.0" + "node": ">=4.1.1" }, "scripts": { "test": "gulp test", diff --git a/tasks/build.js b/tasks/build.js index 30fe44b..fcdcd9d 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -1,28 +1,28 @@ 'use strict'; -module.exports = function(gulp, config) { - return function() { - var path = require('path'); - var replace = require('gulp-replace'); - var appName = require(path.join(config.projectDir, 'package.json')).name; - var Builder = require('jspm').Builder; +module.exports = (gulp, config) => { + return () => { + const path = require('path'); + const replace = require('gulp-replace'); + const appName = require(path.join(config.projectDir, 'package.json')).name; + const Builder = require('jspm').Builder; - var builder = new Builder(); - var distFileName = appName + '.min.js'; - var outFile = path.join(config.distDir, distFileName); + const builder = new Builder(); + const distFileName = appName + '.min.js'; + const outFile = path.join(config.distDir, distFileName); builder.reset(); builder.loadConfig(path.join(config.projectDir, 'jspm.conf.js')) - .then(function() { - var moduleName = 'app'; - var buildConfig = { + .then(() => { + const moduleName = 'app'; + const buildConfig = { format: 'amd', minify: true, sourceMaps: true }; return builder.buildStatic(moduleName, outFile, buildConfig); }) - .then(function() { - var mapFile = outFile + '.map'; + .then(() => { + const mapFile = outFile + '.map'; // Walk around for babel issue // https://github.com/babel/babel/issues/1567 gulp.src(mapFile, {base: config.distDir}) @@ -30,7 +30,7 @@ module.exports = function(gulp, config) { .pipe(gulp.dest(config.distDir)); console.log('Build complete'); }) - .catch(function(err) { + .catch((err) => { console.log('Build Failed', err); }); }; diff --git a/tasks/clean.js b/tasks/clean.js index e1870df..dd36a36 100644 --- a/tasks/clean.js +++ b/tasks/clean.js @@ -1,8 +1,8 @@ 'use strict'; -module.exports = function(gulp, dir) { - return function() { - var del = require('del'); - var path = require('path'); +module.exports = (gulp, dir) => { + return () => { + const del = require('del'); + const path = require('path'); return del([ path.join(dir, '**', '*.js'), diff --git a/tasks/compile.js b/tasks/compile.js index 4a723cf..e0e96f0 100644 --- a/tasks/compile.js +++ b/tasks/compile.js @@ -1,12 +1,11 @@ 'use strict'; -module.exports = function(gulp, src) { +module.exports = (gulp, src) => { function runTSC(directory, done) { - var cp = require('child_process'); - var path = require('path'); - - var tscJs = path.join(process.cwd(), 'node_modules/typescript/bin/tsc'); - var childProcess = cp.spawn('node', [tscJs, '-p', directory], {cwd: process.cwd()}); + const cp = require('child_process'); + const path = require('path'); + const tscJs = path.join(process.cwd(), 'node_modules/typescript/bin/tsc'); + const childProcess = cp.spawn('node', [tscJs, '-p', directory], {cwd: process.cwd()}); childProcess.stdout.on('data', function(data) { console.log(data.toString()); @@ -19,7 +18,7 @@ module.exports = function(gulp, src) { }); } - return function(done) { + return (done) => { return runTSC(src, done); - }; + } }; diff --git a/tasks/default.js b/tasks/default.js index 9b20202..adcff59 100644 --- a/tasks/default.js +++ b/tasks/default.js @@ -1,9 +1,9 @@ 'use strict'; -module.exports = function() { - return function() { - var runSequence = require('run-sequence'); - return runSequence('check', 'compile', 'test:unit', 'test:e2e', function() { +module.exports = () => { + return () => { + const runSequence = require('run-sequence'); + return runSequence('check', 'compile', 'test:unit', 'test:e2e', () => { console.log('Done'); }); - }; + } }; diff --git a/tasks/e2e.js b/tasks/e2e.js index 8cd7639..b7e6106 100644 --- a/tasks/e2e.js +++ b/tasks/e2e.js @@ -1,8 +1,8 @@ 'use strict'; -module.exports = function(gulp, config) { - return function() { - var protractor = require('gulp-protractor').protractor; - var path = require('path'); +module.exports = (gulp, config) => { + return () => { + const protractor = require('gulp-protractor').protractor; + const path = require('path'); return gulp.src([path.join(config.testDir, 'e2e/*.js')]) .pipe(protractor({ diff --git a/tasks/jshint.js b/tasks/jshint.js index 9c21fcd..1514d6a 100644 --- a/tasks/jshint.js +++ b/tasks/jshint.js @@ -1,15 +1,15 @@ 'use strict'; -module.exports = function(gulp, config) { - return function() { - var jsHint = require('gulp-jshint'); - var path = require('path'); +module.exports = (gulp, config) => { + return () => { + const jsHint = require('gulp-jshint'); + const path = require('path'); return gulp.src([ - path.join(config.configDir, '**', '*.js'), - '!' + path.join(config.projectDir, 'jspm.conf.js'), - path.join(config.taskDir, '**', '*.js'), - 'gulpfile.js' - ]) + path.join(config.configDir, '**', '*.js'), + '!' + path.join(config.projectDir, 'jspm.conf.js'), + path.join(config.taskDir, '**', '*.js'), + 'gulpfile.js' + ]) .pipe(jsHint(path.join(config.projectDir, '.jshintrc'))) .pipe(jsHint.reporter(require('jshint-stylish'))); }; diff --git a/tasks/ngannotate.js b/tasks/ngannotate.js index 5dc35e9..bdab3d0 100644 --- a/tasks/ngannotate.js +++ b/tasks/ngannotate.js @@ -1,8 +1,8 @@ 'use strict'; -module.exports = function(gulp, config) { - return function() { - var ngAnnotate = require('gulp-ng-annotate'); - var path = require('path'); +module.exports = (gulp, config) => { + return () => { + const ngAnnotate = require('gulp-ng-annotate'); + const path = require('path'); return gulp.src(path.join(config.srcDir, '**', '*.js')) .pipe(ngAnnotate()) diff --git a/tasks/ngdirectives.js b/tasks/ngdirectives.js index 3743077..f7beb7d 100644 --- a/tasks/ngdirectives.js +++ b/tasks/ngdirectives.js @@ -1,8 +1,8 @@ 'use strict'; -module.exports = function(gulp, config) { - return function() { - var directiveReplace = require('gulp-directive-replace'); - var path = require('path'); +module.exports = (gulp, config) => { + return () => { + const directiveReplace = require('gulp-directive-replace'); + const path = require('path'); return gulp.src(path.join(config.srcDir, '**', '*.js')) .pipe(directiveReplace()) diff --git a/tasks/server.js b/tasks/server.js index 2d343fc..3fa36ab 100644 --- a/tasks/server.js +++ b/tasks/server.js @@ -1,11 +1,11 @@ 'use strict'; -module.exports = function(gulp, serverRootDir, watchDir, openBrowser) { +module.exports = (gulp, serverRootDir, watchDir, openBrowser) => { var fs = require('fs'); - return function() { - var path = require('path'); - var portFinder = require('portfinder'); - var webServer = require('gulp-webserver'); + return () => { + const path = require('path'); + const portFinder = require('portfinder'); + const webServer = require('gulp-webserver'); openBrowser = typeof openBrowser !== 'undefined' ? openBrowser : true; if (shouldWatchTypeScript() && liveReload()) { @@ -17,7 +17,7 @@ module.exports = function(gulp, serverRootDir, watchDir, openBrowser) { return portFinder.getPort({ host: 'localhost' - }, function runServer(err, port) { + }, (err, port) => { gulp.src([serverRootDir]) .pipe(webServer({ livereload: { diff --git a/tasks/test.js b/tasks/test.js index 4e18fd7..2053aba 100644 --- a/tasks/test.js +++ b/tasks/test.js @@ -1,8 +1,8 @@ 'use strict'; -module.exports = function(dir) { - return function(done) { - var path = require('path'); - var Server = require('karma').Server; +module.exports = (dir) => { + return (done) => { + const path = require('path'); + const Server = require('karma').Server; new Server({ configFile: path.join(dir, 'karma.conf.js') diff --git a/tasks/tslint.js b/tasks/tslint.js index 2fbf0d0..3c4fe51 100644 --- a/tasks/tslint.js +++ b/tasks/tslint.js @@ -1,8 +1,8 @@ 'use strict'; -module.exports = function(gulp, directory, configuration) { - return function() { - var path = require('path'); - var tslint = require('gulp-tslint'); +module.exports = (gulp, directory, configuration) => { + return () => { + const path = require('path'); + const tslint = require('gulp-tslint'); return gulp.src([ path.join(directory, '**', '*.ts'), diff --git a/tasks/typedoc.js b/tasks/typedoc.js index cb8ad3a..9615203 100644 --- a/tasks/typedoc.js +++ b/tasks/typedoc.js @@ -1,12 +1,12 @@ 'use strict'; -module.exports = function(gulp, config) { - return function() { - var path = require('path'); - var typeDoc = require('gulp-typedoc'); - var appName = require(path.join(config.projectDir, 'package.json')).name; - var tsConfig = require(path.join(config.srcDir, 'tsconfig.json')); +module.exports = (gulp, config) => { + return () => { + const path = require('path'); + const typeDoc = require('gulp-typedoc'); + const appName = require(path.join(config.projectDir, 'package.json')).name; + const tsConfig = require(path.join(config.srcDir, 'tsconfig.json')); + const compilerOptions = tsConfig.compilerOptions; - var compilerOptions = tsConfig.compilerOptions; delete(compilerOptions.sourceMap); compilerOptions.out = config.docsDir; compilerOptions.name = appName; From 7534a8e73dc660f79e9e4919e093a5f07c364356 Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:16:01 +0200 Subject: [PATCH 04/10] jslint fixes --- tasks/compile.js | 2 +- tasks/default.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/compile.js b/tasks/compile.js index e0e96f0..a1b09c9 100644 --- a/tasks/compile.js +++ b/tasks/compile.js @@ -20,5 +20,5 @@ module.exports = (gulp, src) => { return (done) => { return runTSC(src, done); - } + }; }; diff --git a/tasks/default.js b/tasks/default.js index adcff59..f29d923 100644 --- a/tasks/default.js +++ b/tasks/default.js @@ -5,5 +5,5 @@ module.exports = () => { return runSequence('check', 'compile', 'test:unit', 'test:e2e', () => { console.log('Done'); }); - } + }; }; From 465be3f3174de36e635d903dff3f773f3d0cc497 Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:16:42 +0200 Subject: [PATCH 05/10] gulp tasks upgrade to node 4.x --- gulpfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 06968e5..c02ccda 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,8 +1,8 @@ 'use strict'; -var gulp = require('gulp'); -var path = require('path'); +const gulp = require('gulp'); +const path = require('path'); -var config = { +const config = { projectDir: __dirname, configDir: path.join(__dirname, 'config'), taskDir: path.join(__dirname, 'tasks'), From 6a878bbe8de4867c6bdb2f0a06e53cb3e12504c2 Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:17:27 +0200 Subject: [PATCH 06/10] refactor --- tasks/default.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/default.js b/tasks/default.js index f29d923..a513cfc 100644 --- a/tasks/default.js +++ b/tasks/default.js @@ -1,8 +1,7 @@ 'use strict'; module.exports = () => { return () => { - const runSequence = require('run-sequence'); - return runSequence('check', 'compile', 'test:unit', 'test:e2e', () => { + return require('run-sequence')('check', 'compile', 'test:unit', 'test:e2e', () => { console.log('Done'); }); }; From ec8ee2793a01812e66c694aff5b2ae3f8d84289f Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:22:45 +0200 Subject: [PATCH 07/10] use strict removed from gulp --- gulpfile.js | 1 - tasks/build.js | 1 - tasks/clean.js | 1 - tasks/compile.js | 1 - tasks/default.js | 1 - tasks/e2e.js | 1 - tasks/jshint.js | 1 - tasks/ngannotate.js | 1 - tasks/ngdirectives.js | 1 - tasks/server.js | 1 - tasks/test.js | 1 - tasks/tslint.js | 1 - tasks/typedoc.js | 1 - 13 files changed, 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c02ccda..b46eeb8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,3 @@ -'use strict'; const gulp = require('gulp'); const path = require('path'); diff --git a/tasks/build.js b/tasks/build.js index fcdcd9d..289e0ec 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, config) => { return () => { const path = require('path'); diff --git a/tasks/clean.js b/tasks/clean.js index dd36a36..816597f 100644 --- a/tasks/clean.js +++ b/tasks/clean.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, dir) => { return () => { const del = require('del'); diff --git a/tasks/compile.js b/tasks/compile.js index a1b09c9..a3e1802 100644 --- a/tasks/compile.js +++ b/tasks/compile.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, src) => { function runTSC(directory, done) { diff --git a/tasks/default.js b/tasks/default.js index a513cfc..e794c52 100644 --- a/tasks/default.js +++ b/tasks/default.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = () => { return () => { return require('run-sequence')('check', 'compile', 'test:unit', 'test:e2e', () => { diff --git a/tasks/e2e.js b/tasks/e2e.js index b7e6106..a8960df 100644 --- a/tasks/e2e.js +++ b/tasks/e2e.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, config) => { return () => { const protractor = require('gulp-protractor').protractor; diff --git a/tasks/jshint.js b/tasks/jshint.js index 1514d6a..ff0f850 100644 --- a/tasks/jshint.js +++ b/tasks/jshint.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, config) => { return () => { const jsHint = require('gulp-jshint'); diff --git a/tasks/ngannotate.js b/tasks/ngannotate.js index bdab3d0..7ec3603 100644 --- a/tasks/ngannotate.js +++ b/tasks/ngannotate.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, config) => { return () => { const ngAnnotate = require('gulp-ng-annotate'); diff --git a/tasks/ngdirectives.js b/tasks/ngdirectives.js index f7beb7d..e8d12db 100644 --- a/tasks/ngdirectives.js +++ b/tasks/ngdirectives.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, config) => { return () => { const directiveReplace = require('gulp-directive-replace'); diff --git a/tasks/server.js b/tasks/server.js index 3fa36ab..096488f 100644 --- a/tasks/server.js +++ b/tasks/server.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, serverRootDir, watchDir, openBrowser) => { var fs = require('fs'); diff --git a/tasks/test.js b/tasks/test.js index 2053aba..2567af4 100644 --- a/tasks/test.js +++ b/tasks/test.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (dir) => { return (done) => { const path = require('path'); diff --git a/tasks/tslint.js b/tasks/tslint.js index 3c4fe51..04d2d30 100644 --- a/tasks/tslint.js +++ b/tasks/tslint.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, directory, configuration) => { return () => { const path = require('path'); diff --git a/tasks/typedoc.js b/tasks/typedoc.js index 9615203..6e58177 100644 --- a/tasks/typedoc.js +++ b/tasks/typedoc.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = (gulp, config) => { return () => { const path = require('path'); From 089d68ee336578f5748816e0c8ee42c0443e3b31 Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:28:17 +0200 Subject: [PATCH 08/10] refactor node4 arrow functions --- tasks/compile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/compile.js b/tasks/compile.js index a3e1802..0dbb29a 100644 --- a/tasks/compile.js +++ b/tasks/compile.js @@ -6,13 +6,13 @@ module.exports = (gulp, src) => { const tscJs = path.join(process.cwd(), 'node_modules/typescript/bin/tsc'); const childProcess = cp.spawn('node', [tscJs, '-p', directory], {cwd: process.cwd()}); - childProcess.stdout.on('data', function(data) { + childProcess.stdout.on('data', (data) => { console.log(data.toString()); }); - childProcess.stderr.on('data', function(data) { + childProcess.stderr.on('data', (data) => { console.log(data.toString()); }); - childProcess.on('close', function() { + childProcess.on('close', () => { done(); }); } From 029882418a49d11498e58c4044072fbb1cdd9417 Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:30:02 +0200 Subject: [PATCH 09/10] travis node upgrade --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2e4bfbd..6700cdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: -- '0.12' +- '4.1.1' before_install: - npm install --quiet -g gulp jspm typescript tsd From 5a44ca6a1bcb35c7650abddace6dde84ab89a80c Mon Sep 17 00:00:00 2001 From: Boguslaw Skrzypkowiak Date: Wed, 23 Sep 2015 23:43:15 +0200 Subject: [PATCH 10/10] jshint update befeore migration to eslint --- .jshintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.jshintrc b/.jshintrc index 5d028c9..16c7369 100644 --- a/.jshintrc +++ b/.jshintrc @@ -14,7 +14,7 @@ "quotmark": "single", "undef": true, "unused": true, - "strict": true, + "strict": false, "trailing": true, "smarttabs": true, "expr": true,