2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

WIP karma: test minified code too

This commit is contained in:
XhmikosR
2021-10-12 18:29:13 +03:00
parent 5bf3fbeef8
commit 001b2d4a98
3 changed files with 157 additions and 2 deletions
+15 -1
View File
@@ -9,11 +9,13 @@ const istanbul = require('rollup-plugin-istanbul')
const { nodeResolve } = require('@rollup/plugin-node-resolve')
const replace = require('@rollup/plugin-replace')
const { browsers } = require('./browsers')
const { terser } = require('rollup-plugin-terser')
const ENV = process.env
const BROWSERSTACK = Boolean(ENV.BROWSERSTACK)
const DEBUG = Boolean(ENV.DEBUG)
const JQUERY_TEST = Boolean(ENV.JQUERY)
const MINIFIED = Boolean(ENV.MINIFIED)
const frameworks = [
'jasmine'
@@ -89,7 +91,19 @@ const config = {
// Inline the required helpers in each file
babelHelpers: 'inline'
}),
nodeResolve()
nodeResolve(),
MINIFIED ?
terser({
compress: {
passes: 2
},
mangle: {
properties: {
regex: /^_/
}
}
}) :
''
],
output: {
format: 'iife',