Bundling multiple JS files into one single file

Transcrypt 3.7 generates multiple JS files in __target__ directory. All
output files will be bundled into one single file with the rollup
module bundler (rollup.js). Unfortunately the information of the
original sourcemap file will be lost.
This commit is contained in:
Carsten Grohmann 2020-10-29 14:32:42 +01:00
parent c6958c1ccf
commit d456f6e25e
3 changed files with 6 additions and 6 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ env/
# Generated (compiled) JavaScript code # Generated (compiled) JavaScript code
__target__/ __target__/
OOMAnalyser.js

View File

@ -63,6 +63,7 @@ venv-clean:
build: venv build: venv
. $(VIRTUAL_ENV)/bin/activate . $(VIRTUAL_ENV)/bin/activate
transcrypt --build --map --nomin -e 6 OOMAnalyser.py transcrypt --build --map --nomin -e 6 OOMAnalyser.py
rollup --format=umd --name OOMAnalyser --file=OOMAnalyser.js -- __target__/OOMAnalyser.js
#+ Serve the current directory on http://127.0.0.1:8080 #+ Serve the current directory on http://127.0.0.1:8080
websrv: websrv:

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<script defer="defer" src="__target__/OOMAnalyser.js"></script> <script defer="defer" src="OOMAnalyser.js"></script>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>OOM Analyser</title> <title>OOM Analyser</title>
@ -839,10 +839,8 @@ function goBack() {
<h3>Installation steps</h3> <h3>Installation steps</h3>
<ol> <ol>
<li>Create an own directory and add a <code>__target__</code> subdirectory</li> <li>Download the <a download="OOMAnalyser.html" href="OOMAnalyser.html">HTML file</a> and the
<li>Download the <a download="OOMAnalyser.html" href="OOMAnalyser.html">HTML file</a> to the main directory and <a download="OOMAnalyser.js" href="OOMAnalyser.js">JavaScript file</a> to the main directory
the <a download="OOMAnalyser.js" href="__target__/OOMAnalyser.js">JavaScript file</a> to the
<code>__target__</code> subdirectory
</li> </li>
<li>Open the file <code>OOMAnalyser.html</code> in your favourite browser.</li> <li>Open the file <code>OOMAnalyser.html</code> in your favourite browser.</li>
</ol> </ol>