Changeset - 9004225eb812
[Not reviewed]
default
7 1 6
Mads Kiilerich (mads) - 7 years ago 2018-12-11 01:14:16
mads@kiilerich.com
front-end: Move .less files to the front-end folder

The less directory was public - we prefer to have the source file outside the
public folder. And we prefer to name the folder after the use of content
instead of the primary file type of content.

The last remaining 3rd-party file, mergely.css, was still not used from that
location and is just removed.
8 files changed with 2 insertions and 45 deletions:
0 comments (0 inline, 0 general)
kallithea/bin/kallithea_cli_front_end.py
Show inline comments
 
@@ -48,25 +48,25 @@ def front_end_build(install_deps, genera
 
        tmp_dir = os.path.join(front_end_dir, 'tmp')
 
        if not os.path.isdir(tmp_dir):
 
            os.mkdir(tmp_dir)
 

	
 
        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',
 
                    '-f', 'html',
 
                    '-a', '.code-highlight'],
 
                    stdout=f)
 
        lesscpath = os.path.join(front_end_dir, 'node_modules', '.bin', 'lessc')
 
        lesspath = os.path.join(public_dir, 'less', 'main.less')
 
        lesspath = os.path.join(front_end_dir, 'main.less')
 
        csspath = os.path.join(public_dir, 'css', 'style.css')
 
        subprocess.check_call([lesscpath, '--source-map',
 
                '--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("Preparing jQuery JS with Flot, Caret and Atwho")
 
        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'))
kallithea/front-end/kallithea-diff.less
Show inline comments
 
file renamed from kallithea/public/less/kallithea-diff.less to kallithea/front-end/kallithea-diff.less
kallithea/front-end/kallithea-labels.less
Show inline comments
 
file renamed from kallithea/public/less/kallithea-labels.less to kallithea/front-end/kallithea-labels.less
kallithea/front-end/kallithea-select2.less
Show inline comments
 
file renamed from kallithea/public/less/kallithea-select2.less to kallithea/front-end/kallithea-select2.less
kallithea/front-end/kallithea-variables.less
Show inline comments
 
file renamed from kallithea/public/less/kallithea-variables.less to kallithea/front-end/kallithea-variables.less
kallithea/front-end/main.less
Show inline comments
 
file renamed from kallithea/public/less/main.less to kallithea/front-end/main.less
 
@@ -6,23 +6,23 @@
 
 * npm install
 
 * npm run less
 
 *
 
 */
 

	
 
/* 3rd party styles */
 
@import "node_modules/bootstrap/less/bootstrap.less";
 
@import (inline) "node_modules/datatables.net-bs/css/dataTables.bootstrap.css";
 
@import (inline) "node_modules/at.js/dist/css/jquery.atwho.css";
 
@import (less) "node_modules/select2/select2.css";
 
@import (less) "node_modules/select2-bootstrap-css/select2-bootstrap.css";
 
@import (less) "tmp/pygments.css";
 
@import (less) "../fontello/css/kallithea.css";
 
@import (less) "../public/fontello/css/kallithea.css";
 

	
 
/* kallithea styles */
 
@import "kallithea-variables.less";
 
@import "kallithea-labels.less";
 
@import "kallithea-select2.less";
 
@import "kallithea-diff.less";
 
@import "style.less";
 

	
 
/* finally, import the optional theme file with local customizations */
 
@import (optional) "theme.less";
kallithea/front-end/style.less
Show inline comments
 
file renamed from kallithea/public/less/style.less to kallithea/front-end/style.less
kallithea/public/less/3rd-party/mergely.css
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)