Changeset - 2b8f69cb7d8c
[Not reviewed]
default
5 5 0
Mads Kiilerich (mads) - 7 years ago 2018-12-10 23:20:54
mads@kiilerich.com
front-end: Use jQuery and Flot from node_modules and stop bundling them

jquery.min.js 1.12.3 was introduced in 7a4dec17e837.

jquery.flot.js 0.8.3 was introduced in 322ce5147fe0.
10 files changed with 23 insertions and 6456 deletions:
0 comments (0 inline, 0 general)
.hgignore
Show inline comments
 
@@ -26,6 +26,10 @@ syntax: regexp
 
^kallithea/front-end/tmp$
 
^kallithea/public/css/style\.css(\.map)?$
 
^kallithea/public/js/bootstrap\.js$
 
^kallithea/public/js/jquery\.flot\.js$
 
^kallithea/public/js/jquery\.flot\.selection\.js$
 
^kallithea/public/js/jquery\.flot\.time\.js$
 
^kallithea/public/js/jquery\.min\.js$
 
^theme\.less$
 
^kallithea\.db$
 
^test\.db$
LICENSE.md
Show inline comments
 
@@ -73,15 +73,15 @@ release.
 
jQuery
 
------
 

	
 
Kallithea incorporates the Javascript system called
 
[jQuery](http://jquery.org/), [herein](kallithea/public/js/jquery.min.js),
 
which can be found together with its Corresponding Source in
 
https://github.com/jquery/jquery at tag 1.12.3 (mirrored at
 
https://kallithea-scm.org/repos/mirror/jquery/files/1.12.3/ ).
 
Kallithea uses the Javascript system called
 
[jQuery](http://jquery.org/).
 

	
 
It is Copyright 2013 jQuery Foundation and other contributors http://jquery.com/ and is under an
 
[MIT-permissive license](MIT-Permissive-License.txt).
 

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

	
 

	
 

	
 
DataTables
 
@@ -254,7 +254,7 @@ in this distribution.
 
Flot
 
----
 

	
 
Kallithea incorporates some parts of a Javascript system called
 
Kallithea uses some parts of a Javascript system called
 
[Flot](http://www.flotcharts.org/), which is:
 

	
 
Copyright (c) 2007-2014 IOLA and Ole Laursen
 
@@ -280,6 +280,9 @@ WHETHER IN AN ACTION OF CONTRACT, TORT O
 
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
OTHER DEALINGS IN THE SOFTWARE.
 

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

	
 

	
 

	
 
Icon fonts
kallithea/bin/kallithea_cli_front_end.py
Show inline comments
 
@@ -66,6 +66,12 @@ def front_end_build(install_deps, genera
 
        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("Preparing jQuery JS with Flot")
 
        shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery', 'dist', 'jquery.min.js'), os.path.join(public_dir, 'js', 'jquery.min.js'))
 
        shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery.flot', 'jquery.flot.js'), os.path.join(public_dir, 'js', 'jquery.flot.js'))
 
        shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery.flot', 'jquery.flot.selection.js'), os.path.join(public_dir, 'js', 'jquery.flot.selection.js'))
 
        shutil.copy(os.path.join(front_end_dir, 'node_modules', 'jquery.flot', 'jquery.flot.time.js'), os.path.join(public_dir, 'js', 'jquery.flot.time.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/front-end/package.json
Show inline comments
 
@@ -2,7 +2,9 @@
 
  "name": "kallithea",
 
  "private": true,
 
  "dependencies": {
 
    "bootstrap": "3.3.7"
 
    "bootstrap": "3.3.7",
 
    "jquery": "1.12.3",
 
    "jquery.flot": "0.8.3"
 
  },
 
  "devDependencies": {
 
    "less": "~2.7",
kallithea/public/js/jquery.flot.js
Show inline comments
 
deleted file
kallithea/public/js/jquery.flot.selection.js
Show inline comments
 
deleted file
kallithea/public/js/jquery.flot.time.js
Show inline comments
 
deleted file
kallithea/public/js/jquery.min.js
Show inline comments
 
deleted file
kallithea/public/js/yui.flot.js
Show inline comments
 
deleted file
scripts/whitespacecleanup.sh
Show inline comments
 
@@ -2,7 +2,7 @@
 

	
 
# Enforce some consistency in whitespace - just to avoid spurious whitespaces changes
 

	
 
files=`hg mani | egrep -v '/codemirror/|/fontello/|/email_templates/|(/lockfiles.py|^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history|select2/select2|yui.flot|jquery.flot.*|yui.2.9|jquery.dataTables)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'`
 
files=`hg mani | egrep -v '/codemirror/|/fontello/|/email_templates/|(/lockfiles.py|^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history|select2/select2|yui.2.9|jquery.dataTables)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'`
 

	
 
sed -i "s/`printf '\r'`//g" $files
 
sed -i -e "s,`printf '\t'`,    ,g" $files
0 comments (0 inline, 0 general)