@-xun/common-dummies
Version:
A collection of dummy projects, packages, and other testable structures
44 lines (43 loc) • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDummyDecoratedPath = getDummyDecoratedPath;
var _fs = require("@-xun/fs");
var _error = require("./error.js");
const DUMMY_PSEUDODECORATOR_DIR = (0, _fs.toAbsolutePath)(__dirname, '..', 'dummies', 'pseudodecorators');
function getDummyDecoratedPath(id) {
return (0, _fs.toPath)(DUMMY_PSEUDODECORATOR_DIR, pseudodecoratedNameToFilename(id));
}
function pseudodecoratedNameToFilename(id) {
switch (id) {
case 'extensionless':
{
return (0, _fs.toRelativePath)('extensionless');
}
case 'js':
{
return (0, _fs.toRelativePath)('js.js');
}
case 'json':
{
return (0, _fs.toRelativePath)('json.json');
}
case 'md':
{
return (0, _fs.toRelativePath)('md.md');
}
case 'ts':
{
return (0, _fs.toRelativePath)('ts.ts');
}
case 'yml':
{
return (0, _fs.toRelativePath)('yml.yml');
}
default:
{
throw new TypeError(_error.ErrorMessage.UnknownPseudodecorator(id));
}
}
}