From ca986523aacead1abd0f9f8f54fecfd51538e643 Mon Sep 17 00:00:00 2001 From: Mario Romano Date: Mon, 16 May 2016 14:46:46 +0100 Subject: [PATCH] #60 log in terminal and copy template file --- .../ng2-alfresco-documentlist/karma.conf.js | 20 +++++++++++++------ .../ng2-alfresco-documentlist/package.json | 7 ++++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ng2-components/ng2-alfresco-documentlist/karma.conf.js b/ng2-components/ng2-alfresco-documentlist/karma.conf.js index 56d729a45e..6fd1d517bd 100644 --- a/ng2-components/ng2-alfresco-documentlist/karma.conf.js +++ b/ng2-components/ng2-alfresco-documentlist/karma.conf.js @@ -1,4 +1,6 @@ -module.exports = function(config) { +'use strict'; + +module.exports = function (config) { config.set({ basePath: '.', @@ -33,7 +35,9 @@ module.exports = function(config) { port: 9876, - logLevel: config.LOG_DEBUG, + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, colors: true, @@ -45,11 +49,12 @@ module.exports = function(config) { plugins: [ 'karma-jasmine', 'karma-coverage', - 'karma-chrome-launcher' + 'karma-chrome-launcher', + 'karma-mocha-reporter' ], // Coverage reporter generates the coverage - reporters: ['progress', 'dots', 'coverage'], + reporters: ['mocha', 'coverage'], // Source files that you wanna generate coverage for. // Do not include tests or libraries (these files will be instrumented by Istanbul) @@ -58,8 +63,11 @@ module.exports = function(config) { }, coverageReporter: { - reporters:[ - {type: 'json', subdir: '.', file: 'coverage-final.json'} + dir: 'coverage/', + reporters: [ + {type: 'text-summary'}, + {type: 'json', subdir: '.', file: 'coverage-final.json'}, + {type: 'html'} ] }, diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index 0269b3128c..08390e1511 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -7,10 +7,14 @@ "postinstall": "npm run typings", "typings": "typings install", "start": "npm run test && http-server -c-1 -o -p 8875 .", - "build": "npm run tslint-test && npm run tslint-src && npm run tslint-root && typings install && rm -rf dist && tsc && license-check", + "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", + "tslint": "npm run tslint-test && npm run tslint-src && npm run tslint-root", "tslint-test": "tslint -c tslint.json test/**/*.ts", "tslint-src": "tslint -c tslint.json src/**/*.ts", "tslint-root": "tslint -c tslint.json *.ts", + "copytemplates": "npm run copy-html && npm run copy-css", + "copy-html": "copyfiles './src/**/*.html' dist", + "copy-css": "copyfiles './src/**/*.css' dist", "licensecheck": "license-check", "tsc": "tsc", "pretest": "npm run build", @@ -63,6 +67,7 @@ "karma-jasmine": "~1.0.2", "license-check": "^1.0.4", "remap-istanbul": "^0.6.3", + "karma-mocha-reporter": "^2.0.3", "traceur": "^0.0.91", "tslint": "^3.8.1", "typescript": "^1.8.10",