mirror of
git://git.proxmox.com/git/novnc-pve.git
synced 2025-01-09 01:18:03 +03:00
transpile javascript before packaging
instead of using the babel-shim (which is not production-ready), create a bundle app.js file with node-es6-module-transpiler in the dh_auto_build step this way, we only need to ship 1 js file instead of many Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
4d91357934
commit
1e63d71311
2
Makefile
2
Makefile
@ -17,7 +17,7 @@ deb: ${DEB}
|
|||||||
${DEB}: | submodule
|
${DEB}: | submodule
|
||||||
rm -rf ${SRCDIR}.tmp
|
rm -rf ${SRCDIR}.tmp
|
||||||
cp -rpa ${SRCDIR} ${SRCDIR}.tmp
|
cp -rpa ${SRCDIR} ${SRCDIR}.tmp
|
||||||
cp -a debian ${SRCDIR}.tmp/debian
|
cp -a debian ${SRCDIR}.tmp/
|
||||||
echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}.tmp/debian/SOURCE
|
echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}.tmp/debian/SOURCE
|
||||||
cd ${SRCDIR}.tmp; dpkg-buildpackage -rfakeroot -b -uc -us
|
cd ${SRCDIR}.tmp; dpkg-buildpackage -rfakeroot -b -uc -us
|
||||||
lintian ${DEB}
|
lintian ${DEB}
|
||||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -2,7 +2,7 @@ Source: novnc-pve
|
|||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||||
Build-Depends: debhelper (>= 7.0.0~), quilt
|
Build-Depends: debhelper (>= 7.0.0~), quilt, node-es6-module-transpiler
|
||||||
Standards-Version: 3.8.3
|
Standards-Version: 3.8.3
|
||||||
Homepage: https://github.com/kanaka/noVNC/
|
Homepage: https://github.com/kanaka/noVNC/
|
||||||
|
|
||||||
|
15
debian/install
vendored
15
debian/install
vendored
@ -1,7 +1,8 @@
|
|||||||
app usr/share/novnc-pve
|
app/images usr/share/novnc-pve/app
|
||||||
core usr/share/novnc-pve
|
app/locale usr/share/novnc-pve/app
|
||||||
docs usr/share/novnc-pve
|
app/sounds usr/share/novnc-pve/app
|
||||||
po usr/share/novnc-pve
|
app/styles usr/share/novnc-pve/app
|
||||||
utils usr/share/novnc-pve
|
app/error-handler.js usr/share/novnc-pve/app
|
||||||
vendor usr/share/novnc-pve
|
app.js usr/share/novnc-pve
|
||||||
index.html.tpl usr/share/novnc-pve
|
docs usr/share/novnc-pve
|
||||||
|
index.html.tpl usr/share/novnc-pve
|
||||||
|
44
debian/patches/0010-use-only-app.js.patch
vendored
Normal file
44
debian/patches/0010-use-only-app.js.patch
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 6d3945c7c0b680a871d789215659f04e42acd6e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dominik Csapak <d.csapak@proxmox.com>
|
||||||
|
Date: Tue, 16 May 2017 10:36:15 +0200
|
||||||
|
Subject: [PATCH 10/10] use only app.js
|
||||||
|
|
||||||
|
because we will use the commonjs version,
|
||||||
|
we only need to use the generated app.js
|
||||||
|
|
||||||
|
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
|
||||||
|
---
|
||||||
|
vnc.html | 17 +----------------
|
||||||
|
1 file changed, 1 insertion(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/vnc.html b/vnc.html
|
||||||
|
index ff70e0c..40c726b 100644
|
||||||
|
--- a/vnc.html
|
||||||
|
+++ b/vnc.html
|
||||||
|
@@ -46,22 +46,7 @@
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- begin scripts -->
|
||||||
|
- <!-- promise polyfills promises for IE11 -->
|
||||||
|
- <script src="/novnc/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 = "/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
|
||||||
|
- document.head.appendChild(loader);
|
||||||
|
- });
|
||||||
|
- </script>
|
||||||
|
- <!-- actual script modules -->
|
||||||
|
- <script type="module" src="/novnc/app/ui.js"></script>
|
||||||
|
+ <script src="/novnc/app.js"></script>
|
||||||
|
<!-- end scripts -->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.11.0
|
||||||
|
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -7,3 +7,4 @@
|
|||||||
0007-add-replaceable-snippets-in-vnc.html.patch
|
0007-add-replaceable-snippets-in-vnc.html.patch
|
||||||
0008-focus-canvas-after-load.patch
|
0008-focus-canvas-after-load.patch
|
||||||
0009-decrease-animation-time.patch
|
0009-decrease-animation-time.patch
|
||||||
|
0010-use-only-app.js.patch
|
||||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
export DEB_BUILD_HARDENING=1
|
export DEB_BUILD_HARDENING=1
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
compile-modules convert -f bundle app/ui.js > app.js
|
||||||
|
dh_auto_build
|
||||||
|
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
cp vnc.html index.html.tpl
|
cp vnc.html index.html.tpl
|
||||||
dh_install
|
dh_install
|
||||||
|
Loading…
Reference in New Issue
Block a user