Tree.ignorePattern

This commit is contained in:
Chris Wanstrath
2011-11-06 16:28:35 -08:00
parent 11db5e1a5a
commit 862224dce5
2 changed files with 3 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ class TreePane extends Pane
list = $('<ul>')
for path in paths
continue if @tree.ignorePattern.test path
filename = path.replace(root, "").substring 1
type = if fs.isDirectory path then 'dir' else 'file'
encodedPath = encodeURIComponent path

View File

@@ -11,6 +11,8 @@ fs = require 'fs'
module.exports =
class Tree extends Extension
ignorePattern: /\.git|\.xcodeproj|\.DS_Store/
constructor: ->
KeyBinder.register "tree", @
KeyBinder.load require.resolve "tree/key-bindings.coffee"