2013-05-16 17:24:52 +08:00
|
|
|
//
|
|
|
|
// load all the formats
|
|
|
|
//
|
|
|
|
|
2015-05-13 19:00:01 +08:00
|
|
|
var formats = {};
|
|
|
|
var path = require('path');
|
|
|
|
var folder = __dirname + "/";
|
2014-08-03 02:26:01 +08:00
|
|
|
|
2013-05-16 17:24:52 +08:00
|
|
|
require("fs").readdirSync(folder).forEach(function(file) {
|
2013-05-27 17:21:56 +08:00
|
|
|
if (path.extname(file) === '.js' && file !== 'index.js' && file !== 'ogr.js' && file !== 'pg.js' ) {
|
2013-05-16 17:24:52 +08:00
|
|
|
var format = require(folder + file);
|
2013-05-27 17:21:56 +08:00
|
|
|
formats[format.prototype.id] = format;
|
2013-05-16 17:24:52 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = formats;
|