File tree Expand file tree Collapse file tree 3 files changed +382
-219
lines changed
Expand file tree Collapse file tree 3 files changed +382
-219
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ <h1>Try Kolibri Production Bundle</h1>
99
1010 < pre id ="out "> waiting ... </ pre >
1111
12- < script src ="kolibri-0.9.11 .js "> </ script >
12+ < script src ="kolibri-2026-02-15 .js "> </ script >
1313 < script >
1414 defaultConsoleLogging ( "ch" , LOG_DEBUG ) ;
1515 const asCH = new Intl . NumberFormat ( "ch-DE" ) . format ;
@@ -53,10 +53,12 @@ <h1>Try Kolibri Production Bundle</h1>
5353 const odds = Walk(1,ALL,2);
5454 odds.show();
5555
56- const partialSums = seq = > Walk(1,ALL).map( n = > seq.take(n).foldl$( plusOp, 0));
56+ const partialSums = scan( plusOp, 0); // eta reduced
5757
58- const triagonalNumbers = partialSums(Walk()).show();
59- const surprise = partialSums(odds).show();
58+ const triagonalNumbers = partialSums(Walk());
59+ console.log(triagonalNumbers.show(10));
60+ const surprise = partialSums(odds);
61+ console.log(surprise.show(10));
6062
6163 const ratios = Walk().map(n=> fib(n+1)/fib(n));
6264 ratios.show();
Original file line number Diff line number Diff line change 44
55Anyway, sometimes it is nice to have a bundled and/or minified version for distribution or statistical purposes.
66
7- Install node and [ rollup] ( https://rollupjs.org ) .
8-
97Make sure that production.js imports all modules that should be part of the distribution.
108Consider using
119 find $PWD -name '* .js' | grep -v Test.js
1210
1311> ** Warning**
1412> The code below will execute arbitrary and possibly harmful code.
1513> Better use GitHub actions for this (public repos only since the code might be spied at).
16- > Otherwise make sure that it runs under a user with limited privileges.
14+ > Otherwise make sure that it runs under a user with limited privileges and inside a container to contain side effects .
1715
1816### Bundle with
1917 cd production
2018 rollup -o productionBundle.js -f es -w . production.js --no-treeshake --compact
2119
2220### Latest statistics
23- 2024-12-14 T 19:08:08 MEZ
21+ 2026-02-15
2422 bundle: 3000 LOC
2523 jsdoc: 3000 LOC
2624 test/ex: 5000 LOC
2725
2826raw incl. docs: 225 kB
27+
28+ ### For a new distro bundle
29+ - push to GitHub and let the gh action create the productionBundle in the gh-pages branch
30+ - checkout gh-pages and copy productionBundle.js to new distro like kolibri-yyyy-MM-dd.js
31+ - checkout main
32+ - adapt and test TryProduction.html
33+ - push
You can’t perform that action at this time.
0 commit comments