@-xun/common-dummies
Version:
A collection of dummy projects, packages, and other testable structures
24 lines (23 loc) • 642 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDummyLoaderPath = getDummyLoaderPath;
var _fs = require("@-xun/fs");
var _error = require("./error.js");
const DUMMY_LOADER_DIR = (0, _fs.toAbsolutePath)(__dirname, '..', 'dummies', 'loaders');
function getDummyLoaderPath(id) {
return (0, _fs.toPath)(DUMMY_LOADER_DIR, loaderNameToFilename(id));
}
function loaderNameToFilename(id) {
switch (id) {
case 'reflective':
{
return (0, _fs.toRelativePath)('reflective.mjs');
}
default:
{
throw new TypeError(_error.ErrorMessage.UnknownLoader(id));
}
}
}