Node: Migrate to ES Modules

This commit is contained in:
Cohee
2024-10-10 22:37:22 +03:00
parent 5a52196331
commit d52b4fbbde
74 changed files with 1291 additions and 1140 deletions

View File

@ -3,11 +3,12 @@
// 1. node plugins.js update
// 2. node plugins.js install <plugin-git-url>
// More operations coming soon.
const { default: git } = require('simple-git');
const fs = require('fs');
const path = require('path');
const { color } = require('./src/util');
import { default as git } from 'simple-git';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { color } from './src/util.js';
const __dirname = import.meta.dirname;
process.chdir(__dirname);
const pluginsPath = './plugins';