refactor: refactoring imports
将来ESMに移行しやすいように Related: #7658 なんかmochaが起動しなくなってるけど理由不明 すぐ直したい
This commit is contained in:
parent
31e3aaeda0
commit
b9cb6d1c10
663 changed files with 3194 additions and 3134 deletions
|
|
@ -1,6 +1,12 @@
|
|||
import * as fs from 'fs';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
|
||||
const license = fs.readFileSync(__dirname + '/../../LICENSE', 'utf-8');
|
||||
//const _filename = fileURLToPath(import.meta.url);
|
||||
const _filename = __filename;
|
||||
const _dirname = dirname(_filename);
|
||||
|
||||
const license = fs.readFileSync(_dirname + '/../../LICENSE', 'utf-8');
|
||||
|
||||
const licenseHtml = license
|
||||
.replace(/\r\n/g, '\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue