basic search implementation

This commit is contained in:
Jacky Zhao 2023-06-19 20:37:45 -07:00
parent c4cf0dcb02
commit fd5c8d17d3
26 changed files with 751 additions and 182 deletions

View file

@ -75,12 +75,14 @@ yargs(hideBin(process.argv))
text = text.replace('export default', '')
text = text.replace('export', '')
const sourcefile = path.relative(path.resolve('.'), args.path)
const resolveDir = path.dirname(sourcefile)
const transpiled = await esbuild.build({
stdin: {
contents: text,
loader: 'ts',
resolveDir: '.',
sourcefile: path.relative(path.resolve('.'), args.path),
resolveDir,
sourcefile,
},
write: false,
bundle: true,