Skip to content

Commit 1bd4884

Browse files
author
James Halliday
committed
document require.resolve(), organize pathexpr info better
1 parent d552367 commit 1bd4884

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

readme.markdown

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,14 @@ brfs looks for:
8989
* `fs.readdirSync(pathExpr, cb)`
9090
* `fs.readdir(pathExpr, cb)`
9191

92-
The `pathExpr` function is evaluated as an expression with `__dirname` and
93-
`__filename` variables available.
94-
95-
You can use methods from the path module such as `path.join()` if you first do
96-
`var path = require('path')`.
92+
Inside of each `pathExpr`, you can use
93+
[statically analyzable](http://npmjs.org/package/static-eval) expressions and
94+
these variables and functions:
95+
96+
* `__dirname`
97+
* `__filename`
98+
* `path` if you `var path = require('path')` first
99+
* `require.resolve()`
97100

98101
Just like node, the default encoding is `null` and will give back a `Buffer`.
99102
If you want differently-encoded file contents for your inline content you can

0 commit comments

Comments
 (0)