refactor: refactoring imports

将来ESMに移行しやすいように
Related: #7658

なんかmochaが起動しなくなってるけど理由不明
すぐ直したい
This commit is contained in:
syuilo 2021-08-19 18:33:41 +09:00
parent 31e3aaeda0
commit b9cb6d1c10
663 changed files with 3194 additions and 3134 deletions

View file

@ -1,3 +1,3 @@
import load from './load';
import load from './load.js';
export default load();

View file

@ -3,14 +3,20 @@
*/
import * as fs from 'fs';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
const meta = require('../meta.json');
import { Source, Mixin } from './types.js';
import * as meta from '../meta.json';
//const _filename = fileURLToPath(import.meta.url);
const _filename = __filename;
const _dirname = dirname(_filename);
/**
* Path of configuration directory
*/
const dir = `${__dirname}/../../.config`;
const dir = `${_dirname}/../../.config`;
/**
* Path of configuration file