Skip to content
This repository was archived by the owner on Jul 17, 2022. It is now read-only.

Commit 5f9bc3b

Browse files
Merge pull request #7 from outercloudstudio/dev
V1.0.2
2 parents 5101abb + 2ceff73 commit 5f9bc3b

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

ExecutionTree.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ function buildCompoundTypes(tokens){
119119
}
120120
}
121121

122+
let removed = false
123+
122124
//Remove Whitespace and Create Strings
123125
for(let i = 0; i < tokens[l].length; i++){
124126
const token = tokens[l][i]
@@ -153,9 +155,17 @@ function buildCompoundTypes(tokens){
153155
tokens.splice(l, 1)
154156

155157
l--
158+
159+
removed = true
160+
161+
break
156162
}
157163
}
158164

165+
if(removed){
166+
continue
167+
}
168+
159169
if(inString){
160170
return new Backend.Error('Unclosed string!')
161171
}

Firework.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,32 @@ export async function Start(path, com){
148148

149149
spinner2.success()
150150

151+
const spinner3 = createSpinner('Waiting for source JSON of ' + targetFileName + '...').start()
152+
153+
let sourceJson = null
154+
155+
let waits = 0
156+
157+
while(!sourceJson && waits < 100){
158+
try{
159+
sourceJson = JSON.parse(fs.readFileSync(sourceFilePath))
160+
}catch{}
161+
162+
waits++
163+
164+
await sleep(100)
165+
}
166+
167+
if(waits >= 100){
168+
spinner3.fail()
169+
170+
console.log(chalk.hex('#ffc825').bold('Warning:') + ' Failed to load ' + files[i])
171+
172+
continue
173+
}else{
174+
spinner3.success()
175+
}
176+
151177
const result = CompileFile(sourceFilePath, targetFilePath, com + '/development_behavior_packs/' + projectName + ' BP', JSON.parse(fs.readFileSync(path + '/.firework/config.json')))
152178

153179
if(result instanceof Backend.Error){

0 commit comments

Comments
 (0)