Permalink
Browse files

added glob example

  • Loading branch information...
1 parent 5c86ecb commit 40ff2274bf5d0d15419831883db202dd025fe299 @tj committed Mar 21, 2012
Showing with 22 additions and 1 deletion.
  1. +17 −0 examples/glob.js
  2. +3 −0 examples/glob.json
  3. +2 −1 package.json
View
@@ -0,0 +1,17 @@
+
+var Parser = require('../')
+ , glob = require('glob')
+ , parser = new Parser;
+
+console.log();
+console.log('Before:');
+console.log(parser.read('examples/glob.json'));
+
+parser.use(function(key, val){
+ return glob.sync(val);
+});
+
+console.log();
+console.log('After:');
+console.log(parser.read('examples/glob.json'));
+console.log();
View
@@ -0,0 +1,3 @@
+{
+ "files": "examples/*.js"
+}
View
@@ -7,7 +7,8 @@
, "dependencies": {}
, "devDependencies": {
"mocha": "*",
- "should": "*"
+ "should": "*",
+ "glob": "*"
}
, "main": "index"
, "engines": { "node": "*" }

0 comments on commit 40ff227

Please sign in to comment.