mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Project has an extraURLs setting
This commit is contained in:
@@ -15,8 +15,14 @@ class Project extends Resource
|
||||
window.resourceTypes.push this
|
||||
|
||||
settings:
|
||||
# Regexp used to ignore paths.
|
||||
ignorePattern: /(\.git|\.xcodeproj|\.DS_Store)/
|
||||
|
||||
# Arrays of { name, url, type } keyed by the root URL.
|
||||
# Used when looking up a directory's contents by url
|
||||
# to add metadata such as magic files or directories.
|
||||
extraURLs: {}
|
||||
|
||||
resources: {}
|
||||
|
||||
activeResource: null
|
||||
@@ -77,6 +83,7 @@ class Project extends Resource
|
||||
type: if fs.isDirectory url then 'dir' else 'file'
|
||||
name: url.replace(root, "").substring 1
|
||||
url: url
|
||||
.concat @settings.extraURLs[root] or []
|
||||
|
||||
# WARNING THIS IS PROBABLY SLOW
|
||||
allURLs: ->
|
||||
|
||||
Reference in New Issue
Block a user