aboutsummaryrefslogtreecommitdiffstats
path: root/.config/pretest.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-28 12:57:52 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-28 12:57:52 +0100
commit58fd0d68bc8b46b23f8cdc65190f08d4e524eb57 (patch)
tree04247b959cb0517eb4a891c6afbabb734bb892bb /.config/pretest.js
parent08b27426fa631a6200a5423161770acab50403bd (diff)
downloadsvg.js-58fd0d68bc8b46b23f8cdc65190f08d4e524eb57.tar.gz
svg.js-58fd0d68bc8b46b23f8cdc65190f08d4e524eb57.zip
Fix build chain so that we now have multiple builds. Details below:
- svg.js: The esm bundle - svg.min.js: The bundle for all browsers for maximum support - svg.node.js: The bundle for node - polyfill.js: Using svg.min.js requires this polyfill in case the Browser does not understand all of ./config/polyfillList.js - polyfillIE.js: This is required when you use IE11 (polyfill.js still required) Please note, that not all test pass for IE11 due to its rounding issues and wrong calculation of bbox. Also note, that `defaultPrevented` is not working for CustomEvents in IE11.
Diffstat (limited to '.config/pretest.js')
-rw-r--r--.config/pretest.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/.config/pretest.js b/.config/pretest.js
index 834e8d8..23b989e 100644
--- a/.config/pretest.js
+++ b/.config/pretest.js
@@ -1,20 +1,20 @@
+/* global XMLHttpRequest */
'use strict'
-function get(uri) {
- var xhr = new XMLHttpRequest()
- xhr.open('GET', uri, false)
- xhr.send()
- if(xhr.status !== 200)
- console.error('SVG.js fixture could not be loaded. Tests will fail.')
- return xhr.responseText
+function get (uri) {
+ var xhr = new XMLHttpRequest()
+ xhr.open('GET', uri, false)
+ xhr.send()
+ if (xhr.status !== 200) { console.error('SVG.js fixture could not be loaded. Tests will fail.') }
+ return xhr.responseText
}
-function main() {
- var style = document.createElement("style")
- document.head.appendChild(style)
- style.sheet.insertRule( get('/fixtures/fixture.css'), 0 )
+function main () {
+ var style = document.createElement('style')
+ document.head.appendChild(style)
+ style.sheet.insertRule(get('/fixtures/fixture.css'), 0)
- document.body.innerHTML = get('/fixtures/fixture.svg')
+ document.body.innerHTML = get('/fixtures/fixture.svg')
}
main()