能力值:
( LV2,RANK:15 )
|
-
-
26 楼
milko
测试了一下,貌似还是有点问题
改了一下 在输出的时候做一个判断 def write_file(fname, buf, mode): items = fname.split("/") path = OUTPUT_FOLDER for i in range(0, len(items) - 1): path += "/" + items[i] md(path) if 'b' in mode: f = open(path + "/" + items[-1], mode) else: f = open(path + "/" + items[-1], mode , encoding='utf-8') f.write(buf) f.close()
|
能力值:
( LV2,RANK:10 )
|
-
-
27 楼
def process(flist, func): for f in flist: func(OUTPUT_FOLDER + f)
with open(OUTPUT_FOLDER + "/app.json", "r") as fs: j = json.load(fs) for sub in j["subPackages"]: func(OUTPUT_FOLDER + "/" + sub["root"] + f)
文件app.json中没有subPackages,所以抛出了异常KeyError: 'subPackages' 这个情况解析是否正常
|
能力值:
( LV1,RANK:0 )
|
-
-
28 楼
分包程序wxml 部分报错 WXSS files... Traceback (most recent call last): File "2.py", line 466, in <module> main() File "2.py", line 458, in main process(["/app-wxss.js","/page-frame.js", "/page-frame.html"], process_wxss) File "2.py", line 367, in process func(OUTPUT_FOLDER + f) File "2.py", line 257, in process_wxss buf = eval('['+j[0:index].replace("undefined",'[]').replace("path",'"path"') + '.wxss"}]') File "<string>", line 1 [[".",[1],"fa{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto}\n.",[1],"fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}\n.",[1],"fa-2x{font-size:2em}\n.",[1],"fa-3x{font-size:3em}\n.",[1],"fa-4x{font-size:4em}\n.",[1],"fa-5x{font-size:5em}\n.",[1],"fa-fw{text-align:center;width:1.28571429em}\n.",[1],"fa-ul{list-style-type:none;margin-left:2.14285714em;padding-left:0}\n.",[1],"fa-ul \x3e .",[1],"_li{position:relative}\n.",[1],"fa-li{left:-2.14285714em;position:absolute;text-align:center;top:.14285714em;width:2.14285714em}\n.",[1],"fa-li.",[1],"fa-lg{left:-1.85714286em}\n.",[1],"fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}\n.",[1],"fa-pull-left{float:left}\n.",[1],"fa-pull-right{float:right}\n.",[1],"fa.",[1],"fa-pull-left{margin-right:.3em}\n.",[1],"fa.",[1],"fa-pull-right{margin-left:.3em}\n.",[1],"pull-right{float:right}\n.",[1],"pull-left{float:left}\n.",[1],"fa.",[1],"pull-left{margin-right:.3em}\n.",[1],"fa.",[1],"pull-right{margin-left:.3em}\n.",[1],"fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}\n.",[1],"fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}\n@-webkit-keyframes fa-spin{0%{-webkit- transform:rotate(0deg);transform:rotate(0deg)}\n100%{-webkit-transform:rotate(359deg);transform:rotate ....... SyntaxError: invalid syntaxUnpacking
|