mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix build problem (#1861)
* fix sourcemap fix relative path and pre publish build change travis wait all test run build and remove unused cpx * global test task modify publish script to accept options * appveyor run * different approach single test run * make it work the analytics test modify start demo shell script to use a different registry * sourcemap demo shell working * update readme and add install after any clean add registry option in start.sh script add develop and normal mode in demo shell add -d option in start.sh to point to the local components add -c option in build script to point to the local components
This commit is contained in:
committed by
Eugenio Romano
parent
b0be88ec37
commit
6da0eaba37
110
ng2-components/ng2-alfresco-login/karma.conf.js
Normal file
110
ng2-components/ng2-alfresco-login/karma.conf.js
Normal file
@@ -0,0 +1,110 @@
|
||||
var webpackConfig = require('./webpack.test');
|
||||
|
||||
module.exports = function (config) {
|
||||
var _config = {
|
||||
basePath: '.',
|
||||
|
||||
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||
|
||||
files: [
|
||||
'./node_modules/hammerjs/hammer.js',
|
||||
|
||||
//diagrams
|
||||
'./node_modules/chart.js/dist/Chart.js',
|
||||
'./node_modules/alfresco-js-api/dist/alfresco-js-api.js',
|
||||
'./node_modules/raphael/raphael.js',
|
||||
'./node_modules/moment/min/moment.min.js',
|
||||
'./node_modules/md-date-time-picker/dist/js/mdDateTimePicker.js',
|
||||
|
||||
{pattern: './node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||
{pattern: './node_modules/ng2-charts/**/*.js', included: false, served: true, watched: false},
|
||||
{pattern: './node_modules/md-date-time-picker/**/*.js', included: false, served: true, watched: false},
|
||||
{pattern: './node_modules/moment/**/*.js', included: false, served: true, watched: false},
|
||||
|
||||
// pdf-js
|
||||
'./node_modules/pdfjs-dist/build/pdf.js',
|
||||
'./node_modules/pdfjs-dist/build/pdf.worker.js',
|
||||
'./node_modules/pdfjs-dist/web/pdf_viewer.js',
|
||||
|
||||
{pattern: 'karma-test-shim.js', watched: false},
|
||||
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
|
||||
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
|
||||
{pattern: './dist/**/*.js', included: false, served: true, watched: false},
|
||||
{pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
|
||||
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
|
||||
],
|
||||
|
||||
webpack: webpackConfig,
|
||||
|
||||
webpackMiddleware: {
|
||||
stats: 'errors-only'
|
||||
},
|
||||
|
||||
port: 9876,
|
||||
|
||||
// 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,
|
||||
|
||||
autoWatch: true,
|
||||
|
||||
captureTimeout: 180000,
|
||||
browserDisconnectTimeout: 180000,
|
||||
browserDisconnectTolerance: 3,
|
||||
browserNoActivityTimeout: 300000,
|
||||
|
||||
browsers: ['Chrome'],
|
||||
|
||||
customLaunchers: {
|
||||
Chrome_travis_ci: {
|
||||
base: 'Chrome',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
|
||||
// Karma plugins loaded
|
||||
plugins: [
|
||||
require('./node_modules/karma-jasmine'),
|
||||
require('./node_modules/karma-coverage'),
|
||||
require('./node_modules/karma-sourcemap-loader'),
|
||||
require('./node_modules/karma-jasmine-ajax'),
|
||||
require('./node_modules/karma-chrome-launcher'),
|
||||
require('./node_modules/karma-mocha-reporter'),
|
||||
require('./node_modules/karma-webpack'),
|
||||
require('./node_modules/karma-jasmine-html-reporter')
|
||||
],
|
||||
|
||||
webpackServer: {
|
||||
noInfo: true
|
||||
},
|
||||
|
||||
// Coverage reporter generates the coverage
|
||||
reporters: ['mocha', 'coverage', 'kjhtml'],
|
||||
|
||||
preprocessors: {
|
||||
'karma-test-shim.js': ['webpack', 'sourcemap'],
|
||||
'./src/**/!(*spec|index|*mock|*model|*event).js': 'coverage'
|
||||
},
|
||||
|
||||
coverageReporter: {
|
||||
includeAllSources: true,
|
||||
dir: 'coverage',
|
||||
subdir: 'report',
|
||||
reporters: [
|
||||
{type: 'text'},
|
||||
{type: 'text-summary'},
|
||||
{type: 'json', file: 'coverage-final.json'},
|
||||
{type: 'html'},
|
||||
{type: 'lcov'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.TRAVIS) {
|
||||
config.browsers = ['Chrome_travis_ci'];
|
||||
}
|
||||
|
||||
config.set(_config);
|
||||
};
|
Reference in New Issue
Block a user