combine.fm/lib/services.js

14 lines
291 B
JavaScript
Raw Normal View History

2015-06-03 21:45:54 -07:00
import path from 'path';
import fs from 'fs';
2015-01-06 12:58:57 +00:00
2015-08-20 23:22:57 +01:00
const services = [];
2015-01-06 12:58:57 +00:00
2018-03-11 20:22:17 +00:00
fs.readdirSync(path.join(__dirname, 'services')).forEach((file) => {
const service = require(path.join(__dirname, 'services', file));
2015-01-06 12:58:57 +00:00
if (service.search) {
2015-08-20 23:22:57 +01:00
services.push(service);
2015-01-06 12:58:57 +00:00
}
});
2015-08-20 23:22:57 +01:00
export default services;