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
a1199b0e
Commit
a1199b0e
authored
Jan 19, 2017
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store imports as read-only files
parent
ddf06bd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
app.js
src/app.js
+2
-6
No files found.
src/app.js
View file @
a1199b0e
...
...
@@ -493,15 +493,10 @@ var run = function () {
})
}
// FIXME: at some point we should invalidate the cache
var
cachedRemoteFiles
=
{}
function
handleImportCall
(
url
,
cb
)
{
var
githubMatch
if
(
files
.
exists
(
url
))
{
cb
(
null
,
files
.
get
(
url
))
}
else
if
(
url
in
cachedRemoteFiles
)
{
cb
(
null
,
cachedRemoteFiles
[
url
])
}
else
if
((
githubMatch
=
/^
(
https
?
:
\/\/)?(
www.
)?
github.com
\/([^/]
*
\/[^/]
*
)\/(
.*
)
/
.
exec
(
url
)))
{
handleGithubCall
(
githubMatch
[
3
],
githubMatch
[
4
],
function
(
err
,
content
)
{
if
(
err
)
{
...
...
@@ -509,7 +504,8 @@ var run = function () {
return
}
cachedRemoteFiles
[
url
]
=
content
// FIXME: at some point we should invalidate the cache
files
.
addReadOnly
(
url
,
content
)
cb
(
null
,
content
)
})
}
else
if
(
/^
[^
:
]
*:
\/\/
/
.
exec
(
url
))
{
...
...
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