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
9f3884dd
Commit
9f3884dd
authored
Jan 08, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove settimeout
parent
aa863b9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
37 deletions
+33
-37
compiler.js
src/app/compiler/compiler.js
+1
-3
basicReadOnlyExplorer.js
src/app/files/basicReadOnlyExplorer.js
+1
-1
browser-files.js
src/app/files/browser-files.js
+31
-33
No files found.
src/app/compiler/compiler.js
View file @
9f3884dd
...
@@ -49,9 +49,7 @@ function Compiler (handleImportCall) {
...
@@ -49,9 +49,7 @@ function Compiler (handleImportCall) {
self
.
lastCompilationResult
=
null
self
.
lastCompilationResult
=
null
self
.
event
.
trigger
(
'compilationFinished'
,
[
false
,
{
'error'
:
{
formattedMessage
:
error
,
severity
:
'error'
}},
files
])
self
.
event
.
trigger
(
'compilationFinished'
,
[
false
,
{
'error'
:
{
formattedMessage
:
error
,
severity
:
'error'
}},
files
])
}
else
{
}
else
{
setTimeout
(
function
()
{
compileJSON
(
input
,
optimize
?
1
:
0
)
compileJSON
(
input
,
optimize
?
1
:
0
)
},
0
)
}
}
})
})
}
}
...
...
src/app/files/basicReadOnlyExplorer.js
View file @
9f3884dd
...
@@ -108,7 +108,7 @@ class BasicReadOnlyExplorer {
...
@@ -108,7 +108,7 @@ class BasicReadOnlyExplorer {
'/content'
:
self
.
get
(
path
)
'/content'
:
self
.
get
(
path
)
})
})
})
})
setTimeout
(
_
=>
callback
(
null
,
tree
),
0
)
callback
(
null
,
tree
)
}
}
removePrefix
(
path
)
{
removePrefix
(
path
)
{
...
...
src/app/files/browser-files.js
View file @
9f3884dd
...
@@ -118,42 +118,40 @@ function Files (storage) {
...
@@ -118,42 +118,40 @@ function Files (storage) {
this
.
resolveDirectory
=
function
(
path
,
callback
)
{
this
.
resolveDirectory
=
function
(
path
,
callback
)
{
var
self
=
this
var
self
=
this
// path = '' + (path || '')
// path = '' + (path || '')
setTimeout
(
function
()
{
function
hashmapize
(
obj
,
path
,
val
)
{
function
hashmapize
(
obj
,
path
,
val
)
{
var
nodes
=
path
.
split
(
'/'
)
var
nodes
=
path
.
split
(
'/'
)
var
i
=
0
var
i
=
0
for
(;
i
<
nodes
.
length
-
1
;
i
++
)
{
for
(;
i
<
nodes
.
length
-
1
;
i
++
)
{
var
node
=
nodes
[
i
]
var
node
=
nodes
[
i
]
if
(
obj
[
node
]
===
undefined
)
{
if
(
obj
[
node
]
===
undefined
)
{
obj
[
node
]
=
{}
obj
[
node
]
=
{}
}
obj
=
obj
[
node
]
}
}
obj
[
nodes
[
i
]]
=
val
obj
=
obj
[
node
]
}
}
var
filesList
=
{}
obj
[
nodes
[
i
]]
=
val
// add r/w filesList to the list
}
storage
.
keys
().
forEach
((
path
)
=>
{
var
filesList
=
{}
// NOTE: as a temporary measure do not show the config file
// add r/w filesList to the list
if
(
path
!==
'.remix.config'
)
{
storage
.
keys
().
forEach
((
path
)
=>
{
filesList
[
self
.
type
+
'/'
+
path
]
=
false
// NOTE: as a temporary measure do not show the config file
}
if
(
path
!==
'.remix.config'
)
{
})
filesList
[
self
.
type
+
'/'
+
path
]
=
false
// add r/o files to the list
}
Object
.
keys
(
readonly
).
forEach
((
path
)
=>
{
})
filesList
[
self
.
type
+
'/'
+
path
]
=
true
// add r/o files to the list
})
Object
.
keys
(
readonly
).
forEach
((
path
)
=>
{
var
tree
=
{}
filesList
[
self
.
type
+
'/'
+
path
]
=
true
// This does not include '.remix.config', because it is filtered
})
// inside list().
var
tree
=
{}
Object
.
keys
(
filesList
).
forEach
(
function
(
path
)
{
// This does not include '.remix.config', because it is filtered
hashmapize
(
tree
,
path
,
{
// inside list().
'/readonly'
:
self
.
isReadOnly
(
path
),
Object
.
keys
(
filesList
).
forEach
(
function
(
path
)
{
'/content'
:
self
.
get
(
path
)
hashmapize
(
tree
,
path
,
{
})
'/readonly'
:
self
.
isReadOnly
(
path
),
'/content'
:
self
.
get
(
path
)
})
})
callback
(
null
,
tree
)
}
)
},
0
)
callback
(
null
,
tree
)
}
}
this
.
removePrefix
=
function
(
path
)
{
this
.
removePrefix
=
function
(
path
)
{
...
...
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