Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
d18ba015
Commit
d18ba015
authored
Jun 03, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler: simplify loaded state
parent
6305c6da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
compiler.js
src/app/compiler.js
+11
-8
No files found.
src/app/compiler.js
View file @
d18ba015
...
@@ -63,7 +63,13 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
...
@@ -63,7 +63,13 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
editor
.
setAnnotations
(
sourceAnnotations
);
editor
.
setAnnotations
(
sourceAnnotations
);
};
};
function
onCompilerLoaded
(
setVersionText
)
{
function
onCompilerLoaded
(
setVersionText
,
version
)
{
setVersionText
(
version
);
previousInput
=
''
;
onChange
();
}
function
onInternalCompilerLoaded
(
setVersionText
)
{
if
(
worker
===
null
)
{
if
(
worker
===
null
)
{
var
compile
;
var
compile
;
var
missingInputs
=
[];
var
missingInputs
=
[];
...
@@ -92,11 +98,9 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
...
@@ -92,11 +98,9 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
}
}
compilationFinished
(
result
,
missingInputs
);
compilationFinished
(
result
,
missingInputs
);
};
};
setVersionText
(
Module
.
cwrap
(
'version'
,
'string'
,
[])());
onCompilerLoaded
(
setVersionText
,
Module
.
cwrap
(
'version'
,
'string'
,
[])());
}
}
previousInput
=
''
;
}
onChange
();
};
function
compilationFinished
(
result
,
missingInputs
)
{
function
compilationFinished
(
result
,
missingInputs
)
{
var
data
;
var
data
;
...
@@ -153,7 +157,7 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
...
@@ -153,7 +157,7 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
return
;
return
;
}
}
window
.
clearInterval
(
check
);
window
.
clearInterval
(
check
);
onCompilerLoaded
(
setVersionText
);
on
Internal
CompilerLoaded
(
setVersionText
);
},
200
);
},
200
);
}
}
...
@@ -166,9 +170,8 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
...
@@ -166,9 +170,8 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
var
data
=
msg
.
data
;
var
data
=
msg
.
data
;
switch
(
data
.
cmd
)
{
switch
(
data
.
cmd
)
{
case
'versionLoaded'
:
case
'versionLoaded'
:
setVersionText
(
data
.
data
);
compilerAcceptsMultipleFiles
=
!!
data
.
acceptsMultipleFiles
;
compilerAcceptsMultipleFiles
=
!!
data
.
acceptsMultipleFiles
;
onCompilerLoaded
(
setVersionText
);
onCompilerLoaded
(
setVersionText
,
data
.
data
);
break
;
break
;
case
'compiled'
:
case
'compiled'
:
compilationFinished
(
data
.
data
,
data
.
missingInputs
);
compilationFinished
(
data
.
data
,
data
.
missingInputs
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment