@@ -34,7 +34,7 @@ var getter = require('../common').getter;
34
34
* To be useful set this to your applications root directory.
35
35
**/
36
36
getter ( module . exports , 'root' , function ( ) {
37
- return this . __trail__ . root ;
37
+ return this . __trail__ . __root__ ;
38
38
} ) ;
39
39
40
40
@@ -50,7 +50,7 @@ getter(module.exports, 'root', function () {
50
50
* [[Paths#prependPath]], and [[Paths#clearPaths]].
51
51
**/
52
52
getter ( module . exports , 'paths' , function ( ) {
53
- return this . __trail__ . paths . toArray ( ) ;
53
+ return this . __trail__ . paths ;
54
54
} ) ;
55
55
56
56
@@ -61,7 +61,7 @@ getter(module.exports, 'paths', function () {
61
61
* Paths at the end have the least priority.
62
62
**/
63
63
module . exports . prependPath = function ( path ) {
64
- this . __trail__ . paths . prepend ( path ) ;
64
+ this . __trail__ . prependPaths ( path ) ;
65
65
} ;
66
66
67
67
@@ -72,25 +72,23 @@ module.exports.prependPath = function (path) {
72
72
* Paths at the beginning have a higher priority.
73
73
**/
74
74
module . exports . appendPath = function ( path ) {
75
- this . __trail__ . paths . append ( path ) ;
75
+ this . __trail__ . appendPaths ( path ) ;
76
76
} ;
77
77
78
78
79
79
/**
80
- * Paths#clearPaths() -> Void
80
+ * Paths#clearPaths() -> Array
81
81
*
82
82
* Clear all paths and start fresh.
83
83
*
84
84
* There is no mechanism for reordering paths, so its best to
85
85
* completely wipe the paths list and reappend them in the order
86
86
* you want.
87
+ *
88
+ * Returns list of previously registered paths.
87
89
**/
88
90
module . exports . clearPaths = function ( ) {
89
- var trail = this . __trail__ ;
90
-
91
- this . paths . forEach ( function ( path ) {
92
- trail . paths . remove ( path ) ;
93
- } ) ;
91
+ return this . __trail__ . removePaths ( ) ;
94
92
} ;
95
93
96
94
@@ -104,5 +102,5 @@ module.exports.clearPaths = function () {
104
102
* [".js", ".css", ".coffee", ".sass", ...]
105
103
**/
106
104
getter ( module . exports , 'extensions' , function ( ) {
107
- return this . __trail__ . extensions . toArray ( ) ;
105
+ return [ ] . concat ( this . __trail__ . __extensions__ ) ;
108
106
} ) ;
0 commit comments