mirror of
https://github.com/grafana/grafana.git
synced 2024-12-27 17:31:18 -06:00
fixing compilation of grunt
This commit is contained in:
parent
f3ebd2d849
commit
a8ae0a5b79
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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',
|
||||
|
@ -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']);
|
||||
|
7
tasks/options/exec.js
Normal file
7
tasks/options/exec.js
Normal file
@ -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"
|
||||
};
|
||||
};
|
@ -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();
|
||||
|
@ -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"
|
||||
]
|
||||
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user