mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-03 16:06:46 +02:00
refactor: refactoring imports
将来ESMに移行しやすいように Related: #7658 なんかmochaが起動しなくなってるけど理由不明 すぐ直したい
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
import load from './load';
|
||||
import load from './load.js';
|
||||
|
||||
export default load();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user