From f3ebd2d84918c8090ed06be326f2ac6ce2b7121c Mon Sep 17 00:00:00 2001 From: Gabriel Nepomuceno Date: Fri, 9 Dec 2016 14:57:25 +0000 Subject: [PATCH 1/5] upgrading bases and correcting identation missing tslint --- package.json | 103 +++++----- public/app/core/services/keyboard_manager.js | 22 +-- public/app/core/utils/kbn.js | 178 +++++++++--------- .../app/features/playlist/playlist_routes.js | 2 +- .../datasource/elasticsearch/datasource.js | 6 +- .../datasource/elasticsearch/query_builder.js | 7 +- tsd.json | 33 ---- 7 files changed, 163 insertions(+), 188 deletions(-) delete mode 100644 tsd.json diff --git a/package.json b/package.json index 5c2e0d3ea3c..39c4c0d8da8 100644 --- a/package.json +++ b/package.json @@ -10,51 +10,56 @@ "url": "http://github.com/grafana/grafana.git" }, "devDependencies": { - "zone.js": "^0.6.6", + "@types/es6-promise": "0.0.32", + "@types/es6-shim": "^0.31.32", + "@types/jquery": "^2.0.34", + "@types/mocha": "^2.2.33", + "@types/rx": "^2.5.34", "autoprefixer": "^6.4.0", "es6-promise": "^3.0.2", "es6-shim": "^0.35.1", "expect.js": "~0.2.0", - "glob": "~7.1.1", - "grunt": "~0.4.0", - "grunt-angular-templates": "^0.5.5", - "grunt-cli": "~0.1.13", - "grunt-contrib-clean": "~0.7.0", + "glob": "~7.0.0", + "grunt": "^0.4.5", + "grunt-angular-templates": "^1.1.0", + "grunt-cli": "~1.2.0", + "grunt-contrib-clean": "~1.0.0", "grunt-contrib-compress": "^1.3.0", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-copy": "~0.8.2", - "grunt-contrib-cssmin": "~0.14.0", - "grunt-contrib-htmlmin": "~0.6.0", - "grunt-contrib-jshint": "~1.0.0", - "grunt-contrib-uglify": "~0.11.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-filerev": "^0.2.1", - "grunt-git-describe": "~2.3.2", - "grunt-karma": "~0.12.2", - "grunt-ng-annotate": "^1.0.1", - "grunt-notify": "^0.4.3", + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-copy": "~1.0.0", + "grunt-contrib-cssmin": "~1.0.2", + "grunt-contrib-htmlmin": "~2.0.0", + "grunt-contrib-jshint": "~1.1.0", + "grunt-contrib-uglify": "~2.0.0", + "grunt-contrib-watch": "^1.0.0", + "grunt-filerev": "^2.3.1", + "grunt-git-describe": "~2.4.2", + "grunt-karma": "~2.0.0", + "grunt-ng-annotate": "^3.0.0", + "grunt-notify": "^0.4.5", "grunt-postcss": "^0.8.0", - "grunt-sass": "^1.1.0", - "grunt-string-replace": "~1.2.1", - "grunt-systemjs-builder": "^0.2.6", - "grunt-tslint": "^3.0.2", + "grunt-sass": "^1.2.1", + "grunt-string-replace": "~1.3.1", + "grunt-systemjs-builder": "^0.2.7", + "grunt-tslint": "^3.3.0", "grunt-typescript": "^0.8.0", - "grunt-usemin": "3.0.0", - "jshint-stylish": "~2.1.0", - "karma": "0.13.22", - "karma-chrome-launcher": "~0.2.2", - "karma-coverage": "0.5.3", + "grunt-usemin": "3.1.1", + "jshint-stylish": "~2.2.1", + "karma": "1.3.0", + "karma-chrome-launcher": "~2.0.0", + "karma-coverage": "1.1.1", "karma-coveralls": "1.1.2", - "karma-expect": "~1.1.0", - "karma-mocha": "~0.2.1", - "karma-phantomjs-launcher": "1.0.0", - "load-grunt-tasks": "3.4.0", - "mocha": "2.3.4", - "phantomjs-prebuilt": "^2.1.7", - "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.4", - "sass-lint": "^1.7.0", - "systemjs": "0.19.24" + "karma-expect": "~1.1.3", + "karma-mocha": "~1.3.0", + "karma-phantomjs-launcher": "1.0.2", + "load-grunt-tasks": "3.5.2", + "mocha": "3.2.0", + "phantomjs-prebuilt": "^2.1.13", + "reflect-metadata": "0.1.8", + "rxjs": "5.0.0-rc.5", + "sass-lint": "^1.10.2", + "systemjs": "0.19.41", + "zone.js": "^0.7.2" }, "engines": { "node": "4.x", @@ -67,21 +72,21 @@ }, "license": "Apache-2.0", "dependencies": { - "eventemitter3": "^1.2.0", + "eventemitter3": "^2.0.2", "gaze": "^1.1.2", - "grunt-jscs": "~1.5.x", - "grunt-sass-lint": "^0.2.0", - "grunt-sync": "^0.4.1", - "karma-sinon": "^1.0.3", - "lodash": "^2.4.1", + "grunt-jscs": "3.0.1", + "grunt-sass-lint": "^0.2.2", + "grunt-sync": "^0.6.2", + "karma-sinon": "^1.0.5", + "lodash": "^4.17.2", "mousetrap": "^1.6.0", - "remarkable": "^1.6.2", - "sinon": "1.16.1", - "systemjs-builder": "^0.15.13", - "tether": "^1.2.0", + "remarkable": "^1.7.1", + "sinon": "1.17.6", + "systemjs-builder": "^0.15.34", + "tether": "^1.4.0", "tether-drop": "^1.4.2", - "tslint": "^3.4.0", - "typescript": "^1.7.5", + "tslint": "^4.0.2", + "typescript": "^2.1.4", "virtual-scroll": "^1.1.1" } } diff --git a/public/app/core/services/keyboard_manager.js b/public/app/core/services/keyboard_manager.js index d8cab869ec0..b5eefda81a6 100644 --- a/public/app/core/services/keyboard_manager.js +++ b/public/app/core/services/keyboard_manager.js @@ -175,17 +175,17 @@ function (angular, _, coreModule) { // Foreach keys in label (split on +) for (var i = 0, l = keys.length; k = keys[i], i < l; i++) { switch (k) { - case 'ctrl': - case 'control': - kp++; - modifiers.ctrl.wanted = true; - break; - case 'shift': - case 'alt': - case 'meta': - kp++; - modifiers[k].wanted = true; - break; + case 'ctrl': + case 'control': + kp++; + modifiers.ctrl.wanted = true; + break; + case 'shift': + case 'alt': + case 'meta': + kp++; + modifiers[k].wanted = true; + break; } if (k.length > 1) { // If it is a special key diff --git a/public/app/core/utils/kbn.js b/public/app/core/utils/kbn.js index 78489dcae58..ce98f465bc6 100644 --- a/public/app/core/utils/kbn.js +++ b/public/app/core/utils/kbn.js @@ -17,95 +17,95 @@ function($, _, moment) { kbn.round_interval = function(interval) { switch (true) { - // 0.015s - case (interval <= 15): - return 10; // 0.01s - // 0.035s - case (interval <= 35): - return 20; // 0.02s - // 0.075s - case (interval <= 75): - return 50; // 0.05s - // 0.15s - case (interval <= 150): - return 100; // 0.1s - // 0.35s - case (interval <= 350): - return 200; // 0.2s - // 0.75s - case (interval <= 750): - return 500; // 0.5s - // 1.5s - case (interval <= 1500): - return 1000; // 1s - // 3.5s - case (interval <= 3500): - return 2000; // 2s - // 7.5s - case (interval <= 7500): - return 5000; // 5s - // 12.5s - case (interval <= 12500): - return 10000; // 10s - // 17.5s - case (interval <= 17500): - return 15000; // 15s - // 25s - case (interval <= 25000): - return 20000; // 20s - // 45s - case (interval <= 45000): - return 30000; // 30s - // 1.5m - case (interval <= 90000): - return 60000; // 1m - // 3.5m - case (interval <= 210000): - return 120000; // 2m - // 7.5m - case (interval <= 450000): - return 300000; // 5m - // 12.5m - case (interval <= 750000): - return 600000; // 10m - // 12.5m - case (interval <= 1050000): - return 900000; // 15m - // 25m - case (interval <= 1500000): - return 1200000; // 20m - // 45m - case (interval <= 2700000): - return 1800000; // 30m - // 1.5h - case (interval <= 5400000): - return 3600000; // 1h - // 2.5h - case (interval <= 9000000): - return 7200000; // 2h - // 4.5h - case (interval <= 16200000): - return 10800000; // 3h - // 9h - case (interval <= 32400000): - return 21600000; // 6h - // 24h - case (interval <= 86400000): - return 43200000; // 12h - // 48h - case (interval <= 172800000): - return 86400000; // 24h - // 1w - case (interval <= 604800000): - return 86400000; // 24h - // 3w - case (interval <= 1814400000): - return 604800000; // 1w - // 2y - case (interval < 3628800000): - return 2592000000; // 30d - default: - return 31536000000; // 1y + // 0.015s + case (interval <= 15): + return 10; // 0.01s + // 0.035s + case (interval <= 35): + return 20; // 0.02s + // 0.075s + case (interval <= 75): + return 50; // 0.05s + // 0.15s + case (interval <= 150): + return 100; // 0.1s + // 0.35s + case (interval <= 350): + return 200; // 0.2s + // 0.75s + case (interval <= 750): + return 500; // 0.5s + // 1.5s + case (interval <= 1500): + return 1000; // 1s + // 3.5s + case (interval <= 3500): + return 2000; // 2s + // 7.5s + case (interval <= 7500): + return 5000; // 5s + // 12.5s + case (interval <= 12500): + return 10000; // 10s + // 17.5s + case (interval <= 17500): + return 15000; // 15s + // 25s + case (interval <= 25000): + return 20000; // 20s + // 45s + case (interval <= 45000): + return 30000; // 30s + // 1.5m + case (interval <= 90000): + return 60000; // 1m + // 3.5m + case (interval <= 210000): + return 120000; // 2m + // 7.5m + case (interval <= 450000): + return 300000; // 5m + // 12.5m + case (interval <= 750000): + return 600000; // 10m + // 12.5m + case (interval <= 1050000): + return 900000; // 15m + // 25m + case (interval <= 1500000): + return 1200000; // 20m + // 45m + case (interval <= 2700000): + return 1800000; // 30m + // 1.5h + case (interval <= 5400000): + return 3600000; // 1h + // 2.5h + case (interval <= 9000000): + return 7200000; // 2h + // 4.5h + case (interval <= 16200000): + return 10800000; // 3h + // 9h + case (interval <= 32400000): + return 21600000; // 6h + // 24h + case (interval <= 86400000): + return 43200000; // 12h + // 48h + case (interval <= 172800000): + return 86400000; // 24h + // 1w + case (interval <= 604800000): + return 86400000; // 24h + // 3w + case (interval <= 1814400000): + return 604800000; // 1w + // 2y + case (interval < 3628800000): + return 2592000000; // 30d + default: + return 31536000000; // 1y } }; diff --git a/public/app/features/playlist/playlist_routes.js b/public/app/features/playlist/playlist_routes.js index 646fd55ff4b..1bba519f8f7 100644 --- a/public/app/features/playlist/playlist_routes.js +++ b/public/app/features/playlist/playlist_routes.js @@ -1,4 +1,4 @@ - define([ +define([ 'angular', 'app/core/config', 'lodash' diff --git a/public/app/plugins/datasource/elasticsearch/datasource.js b/public/app/plugins/datasource/elasticsearch/datasource.js index d17af0d27ae..923b3dfb34c 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.js +++ b/public/app/plugins/datasource/elasticsearch/datasource.js @@ -89,8 +89,10 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes "bool": { "must": [ { "range": range }, - { "query_string": { - "query": queryInterpolated } + { + "query_string": { + "query": queryInterpolated + } } ] } diff --git a/public/app/plugins/datasource/elasticsearch/query_builder.js b/public/app/plugins/datasource/elasticsearch/query_builder.js index 8b00d092080..62f5ed2a994 100644 --- a/public/app/plugins/datasource/elasticsearch/query_builder.js +++ b/public/app/plugins/datasource/elasticsearch/query_builder.js @@ -135,9 +135,10 @@ function (queryDef) { "bool": { "must": [ {"range": this.getRangeFilter()}, - {"query_string": { - "analyze_wildcard": true, - "query": '$lucene_query' + { + "query_string": { + "analyze_wildcard": true, + "query": '$lucene_query' } } ] diff --git a/tsd.json b/tsd.json deleted file mode 100644 index e561d2b8d66..00000000000 --- a/tsd.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "v4", - "repo": "angular/DefinitelyTyped", - "ref": "master", - "path": "public/app/headers", - "bundle": "public/app/headers/tsd.d.ts", - "installed": { - "es6-promise/es6-promise.d.ts": { - "commit": "31e7317c9a0793857109236ef7c7f223305a8aa9" - }, - "mocha/mocha.d.ts": { - "commit": "055b3172e8eb374a75826710c4d08677872620d3" - }, - "zone/zone.d.ts": { - "commit": "055b3172e8eb374a75826710c4d08677872620d3" - }, - "rx/rx.d.ts": { - "commit": "31e7317c9a0793857109236ef7c7f223305a8aa9" - }, - "rx/rx-lite.d.ts": { - "commit": "31e7317c9a0793857109236ef7c7f223305a8aa9" - }, - "angular2/angular2.d.ts": { - "commit": "31e7317c9a0793857109236ef7c7f223305a8aa9" - }, - "es6-shim/es6-shim.d.ts": { - "commit": "31e7317c9a0793857109236ef7c7f223305a8aa9" - }, - "jquery/jquery.d.ts": { - "commit": "31e7317c9a0793857109236ef7c7f223305a8aa9" - } - } -} From a8ae0a5b79575d1e85acad16882d3a89804a0079 Mon Sep 17 00:00:00 2001 From: Gabriel Nepomuceno Date: Fri, 9 Dec 2016 21:53:00 +0000 Subject: [PATCH 2/5] fixing compilation of grunt --- package.json | 6 +----- public/app/plugins/panel/graph/data_processor.ts | 15 ++++++--------- tasks/build_task.js | 2 +- tasks/default_task.js | 4 ++-- tasks/options/exec.js | 7 +++++++ tasks/options/watch.js | 2 +- tsconfig.json | 13 +++++++++++-- tslint.json | 4 ---- 8 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 tasks/options/exec.js diff --git a/package.json b/package.json index 39c4c0d8da8..b5e0a658569 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,6 @@ "url": "http://github.com/grafana/grafana.git" }, "devDependencies": { - "@types/es6-promise": "0.0.32", - "@types/es6-shim": "^0.31.32", - "@types/jquery": "^2.0.34", - "@types/mocha": "^2.2.33", "@types/rx": "^2.5.34", "autoprefixer": "^6.4.0", "es6-promise": "^3.0.2", @@ -32,6 +28,7 @@ "grunt-contrib-jshint": "~1.1.0", "grunt-contrib-uglify": "~2.0.0", "grunt-contrib-watch": "^1.0.0", + "grunt-exec": "^1.0.1", "grunt-filerev": "^2.3.1", "grunt-git-describe": "~2.4.2", "grunt-karma": "~2.0.0", @@ -41,7 +38,6 @@ "grunt-sass": "^1.2.1", "grunt-string-replace": "~1.3.1", "grunt-systemjs-builder": "^0.2.7", - "grunt-tslint": "^3.3.0", "grunt-typescript": "^0.8.0", "grunt-usemin": "3.1.1", "jshint-stylish": "~2.2.1", diff --git a/public/app/plugins/panel/graph/data_processor.ts b/public/app/plugins/panel/graph/data_processor.ts index 6233ac345c9..7718a2d6cd8 100644 --- a/public/app/plugins/panel/graph/data_processor.ts +++ b/public/app/plugins/panel/graph/data_processor.ts @@ -130,14 +130,8 @@ export class DataProcessor { let fields = []; var firstItem = dataList[0]; - if (firstItem.type === 'docs'){ - if (firstItem.datapoints.length === 0) { - return []; - } - - let fieldParts = []; - - function getPropertiesRecursive(obj) { + let fieldParts = []; + function getPropertiesRecursive(obj) { _.forEach(obj, (value, key) => { if (_.isObject(value)) { fieldParts.push(key); @@ -150,8 +144,11 @@ export class DataProcessor { } }); fieldParts.pop(); + } + if (firstItem.type === 'docs'){ + if (firstItem.datapoints.length === 0) { + return []; } - getPropertiesRecursive(firstItem.datapoints[0]); return fields; } diff --git a/tasks/build_task.js b/tasks/build_task.js index 4a6c208c1c6..b7a2ff79e30 100644 --- a/tasks/build_task.js +++ b/tasks/build_task.js @@ -6,7 +6,7 @@ module.exports = function(grunt) { 'jshint:source', 'jshint:tests', 'jscs', - 'tslint', + 'exec:tslint', 'clean:release', 'copy:node_modules', 'copy:public_to_gen', diff --git a/tasks/default_task.js b/tasks/default_task.js index 2aa0a7d8826..628a4cedd11 100644 --- a/tasks/default_task.js +++ b/tasks/default_task.js @@ -16,13 +16,13 @@ module.exports = function(grunt) { grunt.registerTask('default', [ 'jscs', 'jshint', - 'tslint', + 'exec:tslint', 'clean:gen', 'copy:node_modules', 'copy:public_to_gen', 'phantomjs', 'css', - 'typescript:build' + 'exec:tscompile' ]); grunt.registerTask('test', ['default', 'karma:test', 'no-only-tests']); diff --git a/tasks/options/exec.js b/tasks/options/exec.js new file mode 100644 index 00000000000..1e40f4dc870 --- /dev/null +++ b/tasks/options/exec.js @@ -0,0 +1,7 @@ +module.exports = function(config) { + 'use strict' + return { + tslint : "node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json --type-check", + tscompile: "node ./node_modules/typescript/lib/tsc.js -p tsconfig.json" + }; +}; diff --git a/tasks/options/watch.js b/tasks/options/watch.js index a4c048f648a..5b75af388ca 100644 --- a/tasks/options/watch.js +++ b/tasks/options/watch.js @@ -65,7 +65,7 @@ module.exports = function(config, grunt) { grunt.config('tslint.source.files.src', filepath); grunt.task.run('typescript:build'); - grunt.task.run('tslint'); + grunt.task.run('exec:tslint'); } done(); diff --git a/tsconfig.json b/tsconfig.json index 0afaa053449..27b03c40003 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,9 +10,18 @@ "module": "system", "noEmitOnError": true, "emitDecoratorMetadata": true, - "experimentalDecorators": true + "experimentalDecorators": true, + "noImplicitReturns":false, + "noImplicitThis":false, + "noImplicitUseStrict":false, + "noUnusedLocals":false }, - "files": [ + "include": [ "public/app/**/*.ts" + ], + "exclude": [ + "public/vendor/**/*", + "public/**/*.d.ts" ] + } diff --git a/tslint.json b/tslint.json index 15e36cf1f33..30a9e7bbf3c 100644 --- a/tslint.json +++ b/tslint.json @@ -7,7 +7,6 @@ "forin": false, "indent": [true, "spaces"], "label-position": true, - "label-undefined": true, "max-line-length": [true, 140], "member-access": false, "no-arg": true, @@ -21,7 +20,6 @@ ], "no-construct": true, "no-debugger": true, - "no-duplicate-key": true, "no-duplicate-variable": true, "no-empty": false, "no-eval": true, @@ -31,8 +29,6 @@ "no-switch-case-fall-through": false, "no-trailing-whitespace": true, "no-unused-expression": false, - "no-unused-variable": false, - "no-unreachable": true, "no-use-before-declare": true, "no-var-keyword": false, "object-literal-sort-keys": false, From 7ff07aa7b12865c9360217020433587664ae6feb Mon Sep 17 00:00:00 2001 From: Gabriel Nepomuceno Date: Fri, 9 Dec 2016 22:05:11 +0000 Subject: [PATCH 3/5] Revoming old files --- package.json | 1 - tasks/options/tslint.js | 24 -------------------- tasks/options/typescript.js | 45 ------------------------------------- 3 files changed, 70 deletions(-) delete mode 100644 tasks/options/tslint.js delete mode 100644 tasks/options/typescript.js diff --git a/package.json b/package.json index b5e0a658569..a10ab16fd6c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "grunt-sass": "^1.2.1", "grunt-string-replace": "~1.3.1", "grunt-systemjs-builder": "^0.2.7", - "grunt-typescript": "^0.8.0", "grunt-usemin": "3.1.1", "jshint-stylish": "~2.2.1", "karma": "1.3.0", diff --git a/tasks/options/tslint.js b/tasks/options/tslint.js deleted file mode 100644 index c9658b32f8f..00000000000 --- a/tasks/options/tslint.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = function(config) { - return { - source: { - files: { - src: ['<%= srcDir %>/app/**/*.ts', '!<%= srcDir %>/app/**/*.d.ts'], - } - }, - options: { - configuration: 'tslint.json' - // { - // rules: { - // curly: true, - // align: [true, "parameters", "statements"], - // indent: [true, "spaces"], - // "class-name": true, - // "interface-name": true, - // "semicolon": true, - // "use-strict": [false, "check-module", "check-function"], - // "whitespace": [true, "check-branch", "check-decl", "check-type"], - // } - // } - } - }; -}; diff --git a/tasks/options/typescript.js b/tasks/options/typescript.js deleted file mode 100644 index cac84135f09..00000000000 --- a/tasks/options/typescript.js +++ /dev/null @@ -1,45 +0,0 @@ -module.exports = function() { - 'use strict'; - - return { - build: { - src: ['public/**/*.ts', "!public/vendor/**/*", "!**/*.d.ts"], - dest: 'public_gen/', - options: { - module: 'system', //or commonjs - target: 'es5', //or es3 - rootDir: 'public/', - sourceRoot: 'public/', - declaration: true, - emitDecoratorMetadata: true, - experimentalDecorators: true, - sourceMap: true, - noImplicitAny: false, - } - }, - - // build2: { - // src: ['public/app/alerting#<{(||)}>#*.ts'], - // dest: 'public/.app_gen/alerting/all.js', - // options: { - // target: 'es5', //or es3 - // declaration: true, - // sourceMap: true, - // } - // }, - - watch: { - src: ['public/app/**/*.ts'], - dest: 'public/app_gen', - options: { - module: 'amd', //or commonjs - target: 'es5', //or es3 - rootDir: 'public/app', - declaration: true, - sourceMap: true, - watch: true, - } - } - }; - -}; From 2f46c56672907a0486e432afad45047c337d7a06 Mon Sep 17 00:00:00 2001 From: Gabriel Nepomuceno Date: Fri, 9 Dec 2016 23:41:07 +0000 Subject: [PATCH 4/5] removing type validation because copy needs to be done first --- package.json | 3 +-- tasks/options/exec.js | 2 +- tsconfig.json | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a10ab16fd6c..05599868fb9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "url": "http://github.com/grafana/grafana.git" }, "devDependencies": { - "@types/rx": "^2.5.34", "autoprefixer": "^6.4.0", "es6-promise": "^3.0.2", "es6-shim": "^0.35.1", @@ -51,7 +50,7 @@ "mocha": "3.2.0", "phantomjs-prebuilt": "^2.1.13", "reflect-metadata": "0.1.8", - "rxjs": "5.0.0-rc.5", + "rxjs": "^5.0.0-rc.5", "sass-lint": "^1.10.2", "systemjs": "0.19.41", "zone.js": "^0.7.2" diff --git a/tasks/options/exec.js b/tasks/options/exec.js index 1e40f4dc870..9e74083623c 100644 --- a/tasks/options/exec.js +++ b/tasks/options/exec.js @@ -1,7 +1,7 @@ module.exports = function(config) { 'use strict' return { - tslint : "node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json --type-check", + tslint : "node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json", tscompile: "node ./node_modules/typescript/lib/tsc.js -p tsconfig.json" }; }; diff --git a/tsconfig.json b/tsconfig.json index 27b03c40003..8595b1efcd0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "noImplicitReturns":false, "noImplicitThis":false, "noImplicitUseStrict":false, - "noUnusedLocals":false + "noUnusedLocals":false, + "moduleResolution": "classic" }, "include": [ "public/app/**/*.ts" From cbf0d571f5d460936d1455f5ddc6e1ba08876cf2 Mon Sep 17 00:00:00 2001 From: Gabriel Nepomuceno Date: Sat, 10 Dec 2016 09:00:58 +0000 Subject: [PATCH 5/5] Removing task from other build sources --- tasks/build_task.js | 2 +- tasks/options/watch.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/build_task.js b/tasks/build_task.js index b7a2ff79e30..7d1768fb9b2 100644 --- a/tasks/build_task.js +++ b/tasks/build_task.js @@ -10,7 +10,7 @@ module.exports = function(grunt) { 'clean:release', 'copy:node_modules', 'copy:public_to_gen', - 'typescript:build', + 'exec:tscompile', 'karma:test', 'phantomjs', 'css', diff --git a/tasks/options/watch.js b/tasks/options/watch.js index 5b75af388ca..4fe25375f9f 100644 --- a/tasks/options/watch.js +++ b/tasks/options/watch.js @@ -64,7 +64,7 @@ module.exports = function(config, grunt) { grunt.config('typescript.build.src', filepath); grunt.config('tslint.source.files.src', filepath); - grunt.task.run('typescript:build'); + grunt.task.run('exec:tscompile'); grunt.task.run('exec:tslint'); }