fix(providence): example conf file esm compatible

This commit is contained in:
Thijs Louisse 2021-11-23 10:06:15 +01:00
parent f303ed6866
commit 10b358a732
3 changed files with 6 additions and 2 deletions

View file

@ -4,3 +4,4 @@
- correctly dedupe match-imports exportSpecifiers - correctly dedupe match-imports exportSpecifiers
- windows compatibility - windows compatibility
- example conf file esm compatible

View file

@ -21,7 +21,7 @@
"scripts": { "scripts": {
"dashboard": "node ./dashboard/src/server.js --serve-from-package-root", "dashboard": "node ./dashboard/src/server.js --serve-from-package-root",
"match-lion-imports": "npm run providence analyze match-imports --search-target-collection @lion-targets --reference-collection @lion-references", "match-lion-imports": "npm run providence analyze match-imports --search-target-collection @lion-targets --reference-collection @lion-references",
"providence": "node --max-old-space-size=8192 ./src/cli/index.js", "providence": "node --max-old-space-size=8192 ./src/cli/index.mjs",
"publish-docs": "node ../../packages-node/publish-docs/src/cli.js --github-url https://github.com/ing-bank/lion/ --git-root-dir ../../", "publish-docs": "node ../../packages-node/publish-docs/src/cli.js --github-url https://github.com/ing-bank/lion/ --git-root-dir ../../",
"prepublishOnly": "npm run publish-docs", "prepublishOnly": "npm run publish-docs",
"test:node": "mocha './test-node/**/*.test.js'", "test:node": "mocha './test-node/**/*.test.js'",

View file

@ -1,5 +1,8 @@
import pathLib from 'path'; import pathLib, { dirname } from 'path';
import fs from 'fs'; import fs from 'fs';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
// This file is read by dashboard and cli and needs to be present under process.cwd() // This file is read by dashboard and cli and needs to be present under process.cwd()
// It mainly serves as an example and it allows to run the dashboard locally // It mainly serves as an example and it allows to run the dashboard locally