mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-23 01:05:14 +02:00
upgrade node to latest version v17.9.0 (#500)
* upgrade node to latest version v17.9.0 Signed-off-by: Denis Barbaron <denis.barbaron@orange.com> * remove useless comments in karma configuration file Signed-off-by: Denis Barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
//
|
||||
// Copyright © 2022 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
//
|
||||
|
||||
var _ = require('lodash')
|
||||
|
||||
var webpack = require('webpack')
|
||||
var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin')
|
||||
var ProgressPlugin = require('webpack/lib/ProgressPlugin')
|
||||
|
||||
var pathutil = require('./lib/util/pathutil')
|
||||
var log = require('./lib/util/logger').createLogger('webpack:config')
|
||||
|
||||
@@ -12,106 +13,96 @@ module.exports = {
|
||||
context: __dirname
|
||||
, cache: true
|
||||
, entry: {
|
||||
app: pathutil.resource('app/app.js')
|
||||
, authldap: pathutil.resource('auth/ldap/scripts/entry.js')
|
||||
, authmock: pathutil.resource('auth/mock/scripts/entry.js')
|
||||
}
|
||||
app: pathutil.resource('app/app.js')
|
||||
, authldap: pathutil.resource('auth/ldap/scripts/entry.js')
|
||||
, authmock: pathutil.resource('auth/mock/scripts/entry.js')
|
||||
}
|
||||
, output: {
|
||||
path: pathutil.resource('build')
|
||||
, publicPath: '/static/app/build/'
|
||||
, filename: 'entry/[name].entry.js'
|
||||
, chunkFilename: '[id].[hash].chunk.js'
|
||||
path: pathutil.resource('build')
|
||||
, publicPath: '/static/app/build/'
|
||||
, filename: 'entry/[name].entry.js'
|
||||
, chunkFilename: '[id].[hash].chunk.js'
|
||||
}
|
||||
, stats: {
|
||||
colors: true
|
||||
colors: true
|
||||
}
|
||||
, resolve: {
|
||||
root: [
|
||||
pathutil.resource('app/components')
|
||||
]
|
||||
, modulesDirectories: [
|
||||
'web_modules'
|
||||
, 'bower_components'
|
||||
, 'node_modules'
|
||||
]
|
||||
, alias: {
|
||||
'angular-bootstrap': 'angular-bootstrap/ui-bootstrap-tpls'
|
||||
, localforage: 'localforage/dist/localforage.js'
|
||||
, 'socket.io': 'socket.io-client'
|
||||
, stats: 'stats.js/src/Stats.js'
|
||||
, 'underscore.string': 'underscore.string/index'
|
||||
}
|
||||
modules: [
|
||||
pathutil.resource('app/components')
|
||||
, 'web_modules'
|
||||
, 'bower_components'
|
||||
, 'node_modules'
|
||||
]
|
||||
, descriptionFiles: ['package.json', 'bower.json']
|
||||
, moduleExtensions: ['-loader']
|
||||
, extensions: ['.js', '.json']
|
||||
, enforceModuleExtension: false
|
||||
, alias: {
|
||||
'angular-bootstrap': 'angular-bootstrap/ui-bootstrap-tpls'
|
||||
, localforage: 'localforage/dist/localforage.js'
|
||||
, 'socket.io': 'socket.io-client'
|
||||
, stats: 'stats.js/src/Stats.js'
|
||||
, 'underscore.string': 'underscore.string/index'
|
||||
}
|
||||
}
|
||||
, module: {
|
||||
loaders: [
|
||||
{test: /\.css$/, loader: 'style!css'}
|
||||
, {test: /\.scss$/, loader: 'style!css!sass'}
|
||||
, {test: /\.less$/, loader: 'style!css!less'}
|
||||
, {test: /\.json$/, loader: 'json'}
|
||||
, {test: /\.jpg$/, loader: 'url?limit=1000&mimetype=image/jpeg'}
|
||||
, {test: /\.png$/, loader: 'url?limit=1000&mimetype=image/png'}
|
||||
, {test: /\.gif$/, loader: 'url?limit=1000&mimetype=image/gif'}
|
||||
, {test: /\.svg/, loader: 'url?limit=1&mimetype=image/svg+xml'}
|
||||
, {test: /\.woff/, loader: 'url?limit=1&mimetype=application/font-woff'}
|
||||
, {test: /\.otf/, loader: 'url?limit=1&mimetype=application/font-woff'}
|
||||
, {test: /\.ttf/, loader: 'url?limit=1&mimetype=application/font-woff'}
|
||||
, {test: /\.eot/, loader: 'url?limit=1&mimetype=vnd.ms-fontobject'}
|
||||
, {test: /\.pug$/, loader: 'template-html-loader?engine=jade'}
|
||||
, {test: /\.html$/, loader: 'html-loader'}
|
||||
, {test: /angular\.js$/, loader: 'exports?angular'}
|
||||
, {test: /angular-cookies\.js$/, loader: 'imports?angular=angular'}
|
||||
, {test: /angular-route\.js$/, loader: 'imports?angular=angular'}
|
||||
, {test: /angular-touch\.js$/, loader: 'imports?angular=angular'}
|
||||
, {test: /angular-animate\.js$/, loader: 'imports?angular=angular'}
|
||||
, {test: /angular-growl\.js$/, loader: 'imports?angular=angular'}
|
||||
, {test: /dialogs\.js$/, loader: 'script'}
|
||||
]
|
||||
// TODO: enable when its sane
|
||||
// preLoaders: [
|
||||
// {
|
||||
// test: /\.js$/,
|
||||
// exclude: /node_modules|bower_components/,
|
||||
// loader: 'eslint-loader'
|
||||
// }
|
||||
// ],
|
||||
, noParse: [
|
||||
// pathutil.resource('bower_components')
|
||||
]
|
||||
loaders: [
|
||||
{test: /\.css$/, loader: 'style-loader!css-loader'}
|
||||
, {test: /\.scss$/, loader: 'style-loader!css-loader!sass-loader'}
|
||||
, {test: /\.less$/, loader: 'style-loader!css-loader!less-loader'}
|
||||
, {test: /\.json$/, loader: 'json-loader'}
|
||||
, {test: /\.jpg$/, loader: 'url-loader?limit=1000&mimetype=image/jpeg'}
|
||||
, {test: /\.png$/, loader: 'url-loader?limit=1000&mimetype=image/png'}
|
||||
, {test: /\.gif$/, loader: 'url-loader?limit=1000&mimetype=image/gif'}
|
||||
, {test: /\.svg/, loader: 'url-loader?limit=1&mimetype=image/svg+xml'}
|
||||
, {test: /\.woff/, loader: 'url-loader?limit=1&mimetype=application/font-woff'}
|
||||
, {test: /\.otf/, loader: 'url-loader?limit=1&mimetype=application/font-woff'}
|
||||
, {test: /\.ttf/, loader: 'url-loader?limit=1&mimetype=application/font-woff'}
|
||||
, {test: /\.eot/, loader: 'url-loader?limit=1&mimetype=vnd.ms-fontobject'}
|
||||
, {test: /\.pug$/, loader: 'template-html-loader?engine=jade'}
|
||||
, {test: /\.html$/, loader: 'html-loader'}
|
||||
, {test: /angular\.js$/, loader: 'exports-loader?angular'}
|
||||
, {test: /angular-cookies\.js$/, loader: 'imports-loader?angular=angular'}
|
||||
, {test: /angular-route\.js$/, loader: 'imports-loader?angular=angular'}
|
||||
, {test: /angular-touch\.js$/, loader: 'imports-loader?angular=angular'}
|
||||
, {test: /angular-animate\.js$/, loader: 'imports-loader?angular=angular'}
|
||||
, {test: /angular-growl\.js$/, loader: 'imports-loader?angular=angular'}
|
||||
, {test: /dialogs\.js$/, loader: 'script-loader'}
|
||||
]
|
||||
}
|
||||
, plugins: [
|
||||
new webpack.ResolverPlugin(
|
||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin(
|
||||
'bower.json'
|
||||
, ['main']
|
||||
)
|
||||
)
|
||||
, new webpack.ResolverPlugin(
|
||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin(
|
||||
'.bower.json'
|
||||
, ['main']
|
||||
)
|
||||
)
|
||||
, new CommonsChunkPlugin('entry/commons.entry.js')
|
||||
, new ProgressPlugin(_.throttle(
|
||||
function(progress, message) {
|
||||
var msg
|
||||
if (message) {
|
||||
msg = message
|
||||
}
|
||||
else {
|
||||
msg = progress >= 1 ? 'complete' : 'unknown'
|
||||
}
|
||||
log.info('Build progress %d%% (%s)', Math.floor(progress * 100), msg)
|
||||
}
|
||||
, 1000
|
||||
))
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'commons.entry'
|
||||
, filename: 'entry/commons.entry.js'
|
||||
})
|
||||
, new ProgressPlugin(_.throttle(
|
||||
function(progress, message) {
|
||||
var msg
|
||||
if (message) {
|
||||
msg = message
|
||||
}
|
||||
else {
|
||||
msg = progress >= 1 ? 'complete' : 'unknown'
|
||||
}
|
||||
log.info('Build progress %d%% (%s)', Math.floor(progress * 100), msg)
|
||||
}
|
||||
, 1000
|
||||
))
|
||||
]
|
||||
}
|
||||
, webpackServer: {
|
||||
debug: true
|
||||
, devtool: 'eval'
|
||||
, stats: {
|
||||
colors: true
|
||||
}
|
||||
plugins: [
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true
|
||||
})
|
||||
, new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'commons.entry'
|
||||
, filename: 'entry/commons.entry.js'
|
||||
})
|
||||
]
|
||||
, devtool: 'eval'
|
||||
, stats: {
|
||||
colors: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user