1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-20 05:39:41 +02:00

jsops: migrate to ESM from CJM (#228)

* jsops: migrate to ESM from CJM

* rm unused code

* fix ci
This commit is contained in:
Peter Savchenko 2022-08-24 17:05:40 +03:00 committed by GitHub
parent f05eb15b72
commit 505daafc50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 509 additions and 309 deletions

View file

@ -1,6 +1,14 @@
import fs from 'fs';
import path from 'path';
import config from 'config';
import { fileURLToPath } from 'url';
/**
* The __dirname CommonJS variables are not available in ES modules.
* https://nodejs.org/api/esm.html#no-__filename-or-__dirname
*/
// eslint-disable-next-line @typescript-eslint/naming-convention
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const rcPath = path.resolve(__dirname, '../../../', config.get('rcFile') || './.codexdocsrc');