forked from Hackerfleet/hfos-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
91 lines (79 loc) · 3.1 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
'use strict';
var webpack = require('webpack');
var webpackConfig = require('./webpack.config.js');
module.exports = function(config) {
config.set({
browsers: ['Chrome'],
frameworks: ['jasmine'],
reporters: ['mocha'],
logLevel: config.LOG_INFO,
autoWatch: true,
singleRun: true,
colors: true,
port: 9876,
basePath: '',
files: ['webpack.karma.context.js'],
preprocessors: { 'webpack.karma.context.js': ['webpack'] },
exclude: [],
webpack: {
devtool: 'eval',
entry: {
main: ['./src/main.js',
'lodash',
'jquery',
'bootstrap',
'moment',
'fullcalendar',
'angular',
'angular-aria',
'angular-animate',
'angular-sanitize',
'objectpath',
'angular-clipboard/angular-clipboard.js',
'angular-strap/dist/angular-strap.js',
'angular-strap/dist/angular-strap.tpl.js',
'humanize-duration',
'c3',
'qrcode-generator/qrcode_UTF8.js',
//'angular-qr'
]
},
module: {
loaders: [
{test: /\.js$/, loader: 'babel-loader', exclude: /(\.test.js$|node_modules)/},
{test: require.resolve('jquery'), loader: 'expose-loader?$!expose-loader?jQuery'},
{test: require.resolve('moment'), loader: 'expose-loader?moment'},
{test: /\.css$/, loader: 'style-loader!css-loader'},
{test: /\.tpl.html/, loader: 'html-loader', exclude: /(index.html)/},
{test: /\.json/, loader: 'json-loader'},
//{test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff(2)?)(\?[a-z0-9]+)?$/, loader: 'file-loader'}, // url?limit=50000'}
{test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff(2)).*$/, loader: 'file-loader'},
{test: /[\/]angular\.js$/, loader: "exports-loader?angular"},
{test: /\.scss/, loaders: ['style-loader', 'css-loader', 'sass-loader']},
{
test: require.resolve('tinymce/tinymce'),
loaders: [
'exports-loader?window.tinymce',
'imports-loader?this=>window'
]
},
{
test: /tinymce\/(themes|plugins)\//,
loaders: [
'exports-loader?window.tinymce',
'imports-loader?this=>window'
]
}
]
},
plugins: [
new webpack.ProvidePlugin({
'window.jQuery': 'jquery'
})
]
},
webpackMiddleware: {
noInfo: true
}
});
};