Refactor project to use ES modules and update related scripts
This commit is contained in:
parent
154653523c
commit
62201022ab
|
@ -62,7 +62,7 @@ export default [
|
|||
}
|
||||
},
|
||||
{
|
||||
files: ["po/po2js", "po/xgettext-html"],
|
||||
files: ["po/po2js.cjs", "po/xgettext-html.cjs"],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"version": "1.6.0",
|
||||
"description": "An HTML5 VNC client",
|
||||
"browser": "lib/rfb",
|
||||
"type": "module",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"doc": "docs",
|
||||
|
@ -17,9 +18,9 @@
|
|||
"docs/LICENSE*"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint app core po/po2js po/xgettext-html tests utils",
|
||||
"test": "karma start karma.conf.js",
|
||||
"prepublish": "node ./utils/convert.js --clean"
|
||||
"lint": "eslint app core po/po2js.cjs po/xgettext-html.cjs tests utils",
|
||||
"test": "karma start karma.conf.cjs",
|
||||
"prepare": "node ./utils/convert.cjs --clean"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -15,7 +15,7 @@ update-js: $(JSONFILES)
|
|||
%.po: FORCE
|
||||
msgmerge --update --lang=$* $@ noVNC.pot
|
||||
../app/locale/%.json: FORCE
|
||||
./po2js $*.po $@
|
||||
./po2js.cjs $*.po $@
|
||||
|
||||
update-pot:
|
||||
xgettext --output=noVNC.js.pot \
|
||||
|
@ -29,7 +29,7 @@ update-pot:
|
|||
../app/*.js \
|
||||
../core/*.js \
|
||||
../core/input/*.js
|
||||
./xgettext-html --output=noVNC.html.pot \
|
||||
./xgettext-html.cjs --output=noVNC.html.pot \
|
||||
../vnc.html
|
||||
msgcat --output-file=noVNC.pot \
|
||||
--sort-by-file noVNC.js.pot noVNC.html.pot
|
||||
|
|
|
@ -64,7 +64,7 @@ function makeLibFiles(sourceMaps) {
|
|||
plugins: [],
|
||||
presets: [
|
||||
[ '@babel/preset-env',
|
||||
{ modules: 'commonjs' } ]
|
||||
{ modules: false } ]
|
||||
],
|
||||
ast: false,
|
||||
sourceMaps: sourceMaps,
|
Loading…
Reference in New Issue