File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from css_html_js_minify import css_minify
22from rjsmin import jsmin
3+ import os
34
45INJ_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+
1221def 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
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments