Changeset - 7ec976c8c198
[Not reviewed]
default
0 3 0
Mads Kiilerich (mads) - 7 years ago 2018-12-10 22:35:29
mads@kiilerich.com
front-end: Store temporary files in a tmp directory

Avoid mixing temporary files with source files or have them in the generated
output. But for now, keep them in the front-end directory where we need write
access for node_modules anyway.
3 files changed with 7 insertions and 3 deletions:
0 comments (0 inline, 0 general)
.hgignore
Show inline comments
 
@@ -23,8 +23,8 @@ syntax: regexp
 
^\.coverage$
 
^kallithea/front-end/node_modules$
 
^kallithea/front-end/package-lock\.json$
 
^kallithea/front-end/tmp$
 
^kallithea/public/css/style\.css(\.map)?$
 
^kallithea/public/css/pygments.css$
 
^theme\.less$
 
^kallithea\.db$
 
^test\.db$
kallithea/bin/kallithea_cli_front_end.py
Show inline comments
 
@@ -43,8 +43,12 @@ def front_end_build(install_deps, genera
 
        subprocess.check_call(['npm', 'install'], cwd=front_end_dir)
 

	
 
    if generate:
 
        tmp_dir = os.path.join(front_end_dir, 'tmp')
 
        if not os.path.isdir(tmp_dir):
 
            os.mkdir(tmp_dir)
 

	
 
        click.echo("Generating CSS")
 
        with open(os.path.join(public_dir, 'pygments.css'), 'w') as f:
 
        with open(os.path.join(tmp_dir, 'pygments.css'), 'w') as f:
 
            subprocess.check_call(['pygmentize',
 
                    '-S', 'default',
 
                    '-f', 'html',
kallithea/public/less/main.less
Show inline comments
 
@@ -13,7 +13,7 @@
 
@import (inline) "3rd-party/dataTables.bootstrap.css";
 
@import (less) "../js/select2/select2.css";
 
@import (less) "../js/select2/select2-bootstrap.css";
 
@import (less) "../css/pygments.css";
 
@import (less) "tmp/pygments.css";
 
@import (less) "../fontello/css/kallithea.css";
 

	
 
/* kallithea styles */
0 comments (0 inline, 0 general)