Created
May 11, 2012 11:19
Revisions
-
almost revised this gist
May 11, 2012 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,11 @@ var fs = require('fs'), path = require('path'); // Load all exported objects into a single module. fs.readdirSync(__dirname).forEach(function (filename) { var fullpath = path.join(__dirname, filename), resource, module; if (fullpath !== __filename && 'js' === fullpath.split('.').pop() && '.' !== fullpath[0]) { module = require(fullpath); exports[filename.split('.')[0]] = module; } }); -
almost revised this gist
May 11, 2012 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,6 @@ var fs = require('fs'), path = require('path'); // Load all exported objects into a single module. fs.readdirSync(__dirname).forEach(function (filename) { var fullpath = path.join(__dirname, filename), resource; if (fullpath !== __filename && 'js' === fullpath.split('.').pop() && '.' !== fullpath[0]) { -
almost renamed this gist
May 11, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
almost created this gist
May 11, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ var fs = require('fs'), path = require('path'); // Load all exported objects into a single module. // Allows require('resources').Meeting instead of require('resources/meeting') fs.readdirSync(__dirname).forEach(function (filename) { var fullpath = path.join(__dirname, filename), resource; if (fullpath !== __filename && 'js' === fullpath.split('.').pop() && '.' !== fullpath[0]) { resource = require(fullpath); exports[resource.name] = resource; } });