Use native esm
This commit is contained in:
parent
c4354a6600
commit
70bd12a4d6
37 changed files with 379 additions and 119 deletions
|
@ -1,14 +1,4 @@
|
|||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
|
||||
var services = [];
|
||||
|
||||
fs.readdirSync(path.join(__dirname, 'services')).forEach(function(file) {
|
||||
const service = require(path.join(__dirname, 'services', file));
|
||||
if (service.search) {
|
||||
services.push(service);
|
||||
}
|
||||
});
|
||||
import services from './services.js';
|
||||
|
||||
export default async function (url) {
|
||||
let matchedService;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue