Project has an extraURLs setting

This commit is contained in:
Chris Wanstrath
2011-11-13 01:12:14 -08:00
parent fc5b598f21
commit 03f8b0050d

View File

@@ -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: ->