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
088b11b4
Commit
088b11b4
authored
Feb 05, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move loading message display to the caller of the compiler
parent
1cb05f7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
app.js
src/app.js
+11
-7
compiler-imports.js
src/app/compiler/compiler-imports.js
+2
-3
No files found.
src/app.js
View file @
088b11b4
...
@@ -201,14 +201,18 @@ function run () {
...
@@ -201,14 +201,18 @@ function run () {
if
(
provider
&&
provider
.
exists
(
url
))
{
if
(
provider
&&
provider
.
exists
(
url
))
{
return
provider
.
get
(
url
,
cb
)
return
provider
.
get
(
url
,
cb
)
}
}
handleImports
.
import
(
url
,
(
error
,
content
,
cleanUrl
,
type
,
url
)
=>
{
handleImports
.
import
(
url
,
if
(
!
error
)
{
(
loadingMsg
)
=>
{
filesProviders
[
type
].
addReadOnly
(
cleanUrl
,
content
,
url
)
$
(
'#output'
).
append
(
$
(
'<div/>'
).
append
(
$
(
'<pre/>'
).
text
(
loadingMsg
)))
cb
(
null
,
content
)
}
else
{
cb
(
error
)
}
}
})
(
error
,
content
,
cleanUrl
,
type
,
url
)
=>
{
if
(
!
error
)
{
filesProviders
[
type
].
addReadOnly
(
cleanUrl
,
content
,
url
)
cb
(
null
,
content
)
}
else
{
cb
(
error
)
}
})
})
})
var
offsetToLineColumnConverter
=
new
OffsetToLineColumnConverter
(
compiler
.
event
)
var
offsetToLineColumnConverter
=
new
OffsetToLineColumnConverter
(
compiler
.
event
)
...
...
src/app/compiler/compiler-imports.js
View file @
088b11b4
...
@@ -48,7 +48,7 @@ module.exports = {
...
@@ -48,7 +48,7 @@ module.exports = {
]
]
},
},
import
:
function
(
url
,
cb
)
{
import
:
function
(
url
,
loadingCb
,
cb
)
{
var
handlers
=
this
.
handlers
()
var
handlers
=
this
.
handlers
()
var
found
=
false
var
found
=
false
...
@@ -61,8 +61,7 @@ module.exports = {
...
@@ -61,8 +61,7 @@ module.exports = {
if
(
match
)
{
if
(
match
)
{
found
=
true
found
=
true
// TODO: this needs to be moved to the caller
loadingCb
(
'Loading '
+
url
+
' ...'
)
$
(
'#output'
).
append
(
$
(
'<div/>'
).
append
(
$
(
'<pre/>'
).
text
(
'Loading '
+
url
+
' ...'
)))
handler
.
handler
(
match
,
function
(
err
,
content
,
cleanUrl
)
{
handler
.
handler
(
match
,
function
(
err
,
content
,
cleanUrl
)
{
if
(
err
)
{
if
(
err
)
{
cb
(
'Unable to import "'
+
cleanUrl
+
'": '
+
err
)
cb
(
'Unable to import "'
+
cleanUrl
+
'": '
+
err
)
...
...
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