diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -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$ diff --git a/kallithea/bin/kallithea_cli_front_end.py b/kallithea/bin/kallithea_cli_front_end.py --- a/kallithea/bin/kallithea_cli_front_end.py +++ b/kallithea/bin/kallithea_cli_front_end.py @@ -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', diff --git a/kallithea/public/less/main.less b/kallithea/public/less/main.less --- a/kallithea/public/less/main.less +++ b/kallithea/public/less/main.less @@ -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 */