Skip to content

Commit fe29dc6

Browse files
elikogaCendioOssman
authored andcommitted
Convert NPM bundle to ES-Module format
1 parent 6cf0204 commit fe29dc6

File tree

6 files changed

+13
-152
lines changed

6 files changed

+13
-152
lines changed
File renamed without changes.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
"name": "@novnc/novnc",
33
"version": "1.6.0",
44
"description": "An HTML5 VNC client",
5-
"browser": "lib/rfb",
5+
"type": "module",
66
"files": [
7-
"lib",
7+
"core",
8+
"vendor",
89
"AUTHORS",
910
"VERSION",
1011
"docs/API.md",
1112
"docs/LIBRARY.md",
1213
"docs/LICENSE*"
1314
],
15+
"exports": "./core/rfb.js",
1416
"scripts": {
1517
"lint": "eslint app core po/po2js po/xgettext-html tests utils",
16-
"test": "karma start karma.conf.js",
17-
"prepublish": "node ./utils/convert.js --clean"
18+
"test": "karma start karma.conf.cjs"
1819
},
1920
"repository": {
2021
"type": "git",

po/po2js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20-
const { program } = require('commander');
21-
const fs = require('fs');
22-
const pofile = require("pofile");
20+
import { program } from 'commander';
21+
import fs from 'fs';
22+
import pofile from "pofile";
2323

2424
program
2525
.argument('<input>')

po/xgettext-html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* Licensed under MPL 2.0 (see LICENSE.txt)
66
*/
77

8-
const { program } = require('commander');
9-
const jsdom = require("jsdom");
10-
const fs = require("fs");
8+
import { program } from 'commander';
9+
import jsdom from 'jsdom';
10+
import fs from 'fs';
1111

1212
program
1313
.argument('<INPUT...>')
@@ -106,7 +106,7 @@ let output = "";
106106

107107
for (let str in strings) {
108108
output += "#:";
109-
for (location in strings[str]) {
109+
for (let location in strings[str]) {
110110
output += " " + location;
111111
}
112112
output += "\n";

utils/convert.js

Lines changed: 0 additions & 140 deletions
This file was deleted.

utils/genkeysymdef.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
"use strict";
99

10-
const fs = require('fs');
10+
import fs from 'fs';
1111

1212
let showHelp = process.argv.length === 2;
1313
let filename;

0 commit comments

Comments
 (0)