Skip to content

Commit

Permalink
Remove legacy conversion of modules
Browse files Browse the repository at this point in the history
We no longer support Internet Explorer so we can now require that
browsers support modules.

Some conversion to commonjs still remains for nodejs.
  • Loading branch information
CendioOssman committed Oct 15, 2020
1 parent c01eb5e commit 890cff9
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 123,904 deletions.
6 changes: 0 additions & 6 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ licenses (all MPL 2.0 compatible):

vendor/pako/ : MIT

vendor/browser-es-module-loader/src/ : MIT

vendor/browser-es-module-loader/dist/ : Various BSD style licenses

vendor/promise.js : MIT

Any other files not mentioned above are typically marked with
a copyright/license header at the top of the file. The default noVNC
license is MPL-2.0.
Expand Down
17 changes: 7 additions & 10 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ module.exports = (config) => {

// list of files / patterns to load in the browser (loaded in order)
files: [
{ pattern: 'app/localization.js', included: false },
{ pattern: 'app/webutil.js', included: false },
{ pattern: 'core/**/*.js', included: false },
{ pattern: 'vendor/pako/**/*.js', included: false },
{ pattern: 'vendor/browser-es-module-loader/dist/*.js*', included: false },
{ pattern: 'tests/test.*.js', included: false },
{ pattern: 'tests/fake.*.js', included: false },
{ pattern: 'tests/assertions.js', included: false },
'vendor/promise.js',
'tests/karma-test-main.js',
{ pattern: 'app/localization.js', included: false, type: 'module' },
{ pattern: 'app/webutil.js', included: false, type: 'module' },
{ pattern: 'core/**/*.js', included: false, type: 'module' },
{ pattern: 'vendor/pako/**/*.js', included: false, type: 'module' },
{ pattern: 'tests/test.*.js', type: 'module' },
{ pattern: 'tests/fake.*.js', included: false, type: 'module' },
{ pattern: 'tests/assertions.js', type: 'module' },
],

client: {
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"scripts": {
"lint": "eslint app core po/po2js po/xgettext-html tests utils",
"test": "karma start karma.conf.js",
"prepublish": "node ./utils/use_require.js --as commonjs --clean"
"prepublish": "node ./utils/use_require.js --clean"
},
"repository": {
"type": "git",
Expand All @@ -42,10 +42,7 @@
"devDependencies": {
"@babel/core": "*",
"@babel/plugin-syntax-dynamic-import": "*",
"@babel/plugin-transform-modules-amd": "*",
"@babel/plugin-transform-modules-commonjs": "*",
"@babel/plugin-transform-modules-systemjs": "*",
"@babel/plugin-transform-modules-umd": "*",
"@babel/preset-env": "*",
"@babel/cli": "*",
"babel-plugin-import-redirect": "*",
Expand Down
48 changes: 0 additions & 48 deletions tests/karma-test-main.js

This file was deleted.

17 changes: 0 additions & 17 deletions tests/vnc_playback.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@
<html lang="en">
<head>
<title>VNC Playback</title>
<!-- promise polyfills promises for IE11 -->
<script src="../vendor/promise.js"></script>
<!-- ES2015/ES6 modules polyfill -->
<script type="module">
window._noVNC_has_module_support = true;
</script>
<script>
window.addEventListener("load", function() {
if (window._noVNC_has_module_support) return;
var loader = document.createElement("script");
loader.src = "../vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
document.head.appendChild(loader);
});
</script>
<!-- actual script modules -->
<script type="module" src="./playback-ui.js"></script>
</head>
<body>
Expand All @@ -37,7 +22,5 @@
<div id="VNC_screen">
<div id="VNC_status">Loading</div>
</div>

<script type="module" src="./playback-ui.js"></script>
</body>
</html>
Loading

0 comments on commit 890cff9

Please sign in to comment.