Changeset - 585dee5eb4bb
[Not reviewed]
default
2 3 0
Mads Kiilerich (mads) - 7 years ago 2018-12-10 23:25:58
mads@kiilerich.com
front-end: Use the existing bootstrap.js from node_modules and stop bundling Bootstrap
5 files changed with 11 insertions and 9140 deletions:
0 comments (0 inline, 0 general)
.hgignore
Show inline comments
 
@@ -25,6 +25,7 @@ syntax: regexp
 
^kallithea/front-end/package-lock\.json$
 
^kallithea/front-end/tmp$
 
^kallithea/public/css/style\.css(\.map)?$
 
^kallithea/public/js/bootstrap\.js$
 
^theme\.less$
 
^kallithea\.db$
 
^test\.db$
LICENSE.md
Show inline comments
 
@@ -38,16 +38,16 @@ and licensed under the MIT-permissive li
 
Bootstrap
 
---------
 

	
 
Kallithea incorporates the web framework called
 
Kallithea uses the web framework called
 
[Bootstrap](http://getbootstrap.com/), which is:
 

	
 
Copyright © 2011-2016 Twitter, Inc.
 

	
 
and licensed under the MIT-permissive license, which is
 
[included in this distribution](MIT-Permissive-License.txt),
 
which can be found together with its Corresponding Source in
 
https://github.com/twbs/bootstrap at tag v3.3.7 (mirrored at
 
https://kallithea-scm.org/repos/mirror/bootstrap/ ).
 
[included in this distribution](MIT-Permissive-License.txt).
 

	
 
It is not distributed with Kallithea, but will be downloaded
 
using the ''kallithea-cli front-end-build'' command.
 

	
 

	
 

	
kallithea/bin/kallithea_cli_front_end.py
Show inline comments
 
@@ -16,6 +16,7 @@ import click
 
import kallithea.bin.kallithea_cli_base as cli_base
 

	
 
import os
 
import shutil
 
import subprocess
 
import json
 

	
 
@@ -48,7 +49,7 @@ def front_end_build(install_deps, genera
 
        if not os.path.isdir(tmp_dir):
 
            os.mkdir(tmp_dir)
 

	
 
        click.echo("Generating CSS")
 
        click.echo("Building CSS styling based on Bootstrap")
 
        with open(os.path.join(tmp_dir, 'pygments.css'), 'w') as f:
 
            subprocess.check_call(['pygmentize',
 
                    '-S', 'default',
 
@@ -62,6 +63,9 @@ def front_end_build(install_deps, genera
 
                '--source-map-less-inline', lesspath, csspath],
 
                cwd=front_end_dir)
 

	
 
        click.echo("Preparing Bootstrap JS")
 
        shutil.copy(os.path.join(front_end_dir, 'node_modules', 'bootstrap', 'dist', 'js', 'bootstrap.js'), os.path.join(public_dir, 'js', 'bootstrap.js'))
 

	
 
        click.echo("Generating LICENSES.txt")
 
        check_licensing_json_path = os.path.join(tmp_dir, 'licensing.json')
 
        licensing_txt_path = os.path.join(public_dir, 'LICENSES.txt')
kallithea/public/css/bootstrap.css
Show inline comments
 
deleted file
kallithea/public/js/bootstrap.js
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)