Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/glkote"]
path = src/glkote
url = https://github.com/erkyrath/glkote.git
39 changes: 20 additions & 19 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,32 @@
# jQuery, but we don't try to include it -- that makes it hard to integrate
# Quixe with other web services. We assume that the host page already has
# jQuery available (version 1.9 or later).
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import sys
import re
import subprocess
import sys

regex_debug = re.compile(b';;;.+$', re.M)

regex_debug = re.compile(';;;.+$', re.M)

def compress_source(target, srcls):
print 'Writing', target
targetfl = open(target, 'w')
proc = subprocess.Popen(['python', 'tools/rjsmin.py'],
stdin=subprocess.PIPE,
stdout=targetfl)
for src in srcls:
fl = open(src)
dat = fl.read()
dat = regex_debug.sub('', dat)
fl.close()
proc.stdin.write(dat)
proc.stdin.close()
ret = proc.wait()
if (ret):
raise Exception('Process result code %d' % (ret,))
targetfl.close()
print('Writing', target)
with open(target, 'wb') as targetfl:
proc = subprocess.Popen([sys.executable, 'tools/rjsmin.py'],
stdin=subprocess.PIPE,
stdout=targetfl)
for src in srcls:
with open(src, 'rb') as fl:
dat = fl.read()
dat = regex_debug.sub(b'', dat)
proc.stdin.write(dat)
proc.stdin.close()
ret = proc.wait()
if (ret):
raise Exception('Process result code %d' % (ret,))

compress_source(
'lib/glkote.min.js', [
Expand All @@ -49,4 +51,3 @@ def compress_source(target, srcls):
'src/quixe/gi_dispa.js',
'src/quixe/gi_load.js',
])

14 changes: 6 additions & 8 deletions lib/glkote.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading