diff modules.js @ 24:b80ab94da447

Add new modules files.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 01 Nov 2010 00:02:27 +0100
parents
children b2faacfefb90
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/modules.js
@@ -0,0 +1,14 @@
+var modules = exports;
+
+var files = require('fs').readdirSync('modules');
+var regex = /^mod_.*\.js/;
+
+for (var i in files) {
+	var file = files[i];
+	if (!regex.test(file))
+		continue;
+
+	var module = require('./modules/' + files[i]);
+	for (var j in module)
+		modules[j] = module[j];
+}