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

3
.gitignore vendored
View File

@ -10,4 +10,5 @@ env/
.idea
# Generated (compiled) JavaScript code
__target__/
__target__/
OOMAnalyser.js

View File

@ -63,6 +63,7 @@ venv-clean:
build: venv
. $(VIRTUAL_ENV)/bin/activate
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
websrv:

View File

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