:|
This commit is contained in:
11
src/main.ts
11
src/main.ts
@@ -47,9 +47,14 @@ async function compileProject(
|
||||
}
|
||||
|
||||
//add UserScript header
|
||||
let content = readFileSync(outPath).toString()
|
||||
|
||||
writeFileSync(outPath, metaString + content)
|
||||
if (lstatSync(outPath).isFile()) {
|
||||
if (!error) {
|
||||
let content = readFileSync(outPath).toString()
|
||||
writeFileSync(outPath, metaString + content)
|
||||
} else {
|
||||
unlinkSync(outPath)
|
||||
}
|
||||
}
|
||||
|
||||
return [metaJson, error]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user