UNPKG

@storm-stack/core

Version:

A build toolkit and runtime used by Storm Software in TypeScript applications

39 lines (36 loc) 1.21 kB
'use strict'; var chunk3ONWID2V_cjs = require('./chunk-3ONWID2V.cjs'); var joinPaths = require('@stryke/path/join-paths'); var resolve = require('@stryke/path/resolve'); async function resolvePath(context, file) { let path = context.vfs.resolvePath(file); if (path) { return path; } path = file; if (context.vfs.existsSync(path)) { return path; } path = joinPaths.joinPaths(context.options.workspaceConfig.workspaceRoot, file); if (context.vfs.existsSync(path)) { return path; } path = joinPaths.joinPaths(context.options.workspaceConfig.workspaceRoot, context.options.projectRoot, file); if (context.vfs.existsSync(path)) { return path; } path = joinPaths.joinPaths(context.options.projectRoot, file); if (context.vfs.existsSync(path)) { return path; } return resolve.resolvePackage(file, { paths: [ context.options.workspaceConfig.workspaceRoot, joinPaths.joinPaths(context.options.workspaceConfig.workspaceRoot, context.options.projectRoot) ] }); } chunk3ONWID2V_cjs.__name(resolvePath, "resolvePath"); exports.resolvePath = resolvePath; //# sourceMappingURL=chunk-BI5CL7FJ.cjs.map //# sourceMappingURL=chunk-BI5CL7FJ.cjs.map