Use native esm
This commit is contained in:
parent
c4354a6600
commit
70bd12a4d6
37 changed files with 379 additions and 119 deletions
|
@ -1,13 +1,15 @@
|
|||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import * as deezer from './services/deezer/index.js';
|
||||
import * as google from './services/google/index.js';
|
||||
import * as itunes from './services/itunes/index.js';
|
||||
import * as spotify from './services/spotify/index.js';
|
||||
import * as youtube from './services/youtube/index.js';
|
||||
|
||||
const services = [];
|
||||
|
||||
fs.readdirSync(path.join(__dirname, 'services')).forEach((file) => {
|
||||
const service = require(path.join(__dirname, 'services', file));
|
||||
if (service.search) {
|
||||
services.push(service);
|
||||
}
|
||||
});
|
||||
const services = [
|
||||
deezer,
|
||||
google,
|
||||
itunes,
|
||||
spotify,
|
||||
youtube,
|
||||
]
|
||||
|
||||
export default services;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue