Skip to content

Commit 7bc7adb

Browse files
committed
Fix build + change version in package.json
1 parent 076c277 commit 7bc7adb

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

build.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from css_html_js_minify import css_minify
22
from rjsmin import jsmin
3+
import os
34

45
INJ_TEMPLATE = '{js};cheatgui.utils.includeCSS(`{css}`)'
56

@@ -9,6 +10,14 @@ def read(path: str):
910
return f.read()
1011

1112

13+
def create_directory(directory):
14+
try:
15+
if not os.path.exists(directory):
16+
os.makedirs(directory)
17+
except OSError:
18+
print('Error: Creating directory: ' + directory)
19+
20+
1221
def write(path: str, text: str):
1322
with open(path, 'w+') as f:
1423
f.write(text)
@@ -21,6 +30,8 @@ def main():
2130
mjs = jsmin(js)
2231
mcss = css_minify(css)
2332

33+
create_directory('build')
34+
2435
write('build/cheatgui.min.js', mjs)
2536
write('build/cheatgui.min.css', mcss)
2637

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cheatgui",
3-
"version": "0.10.0",
3+
"version": "0.12.0",
44
"description": "Effortless library for building window-based interfaces",
55
"main": "cheatgui.js",
66
"scripts": {

0 commit comments

Comments
 (0)