Revert "builtin.ts: treat EXAMPLES_PATH as relative to app root." (#6246)

Reverts compiler-explorer/compiler-explorer#6237.

This PR broke the recommended `make run` workflow. When using `make
run`, the dist folder does not contain the needed resources.
This commit is contained in:
Kait Lam
2024-03-14 23:05:36 +10:00
committed by GitHub
parent b3e28f4fd5
commit 44aa5769c8

View File

@@ -26,12 +26,11 @@ import fs from 'fs';
import fsp from 'fs/promises';
import path from 'path';
import * as utils from '../utils.js';
import * as props from '../properties.js';
import type {Source, SourceEntry} from './index.js';
const EXAMPLES_PATH = utils.resolvePathFromAppRoot(props.get('builtin', 'sourcePath', './examples/'));
const EXAMPLES_PATH = props.get('builtin', 'sourcePath', './examples/');
const NAME_SUBSTUTION_PATTERN = new RegExp('_', 'g');
const ALL_EXAMPLES: SourceEntry[] = fs.readdirSync(EXAMPLES_PATH).flatMap(folder => {
// Recurse through the language folders