UNPKG

@inlang/paraglide-js

Version:

[![Inlang-ecosystem compatibility badge](https://cdn.jsdelivr.net/gh/opral/monorepo@main/inlang/assets/md-badges/inlang.svg)](https://inlang.com)

19 lines (18 loc) 663 B
import { DEFAULT_OUTDIR } from "../defaults.js"; import { prompt } from "../utils.js"; export const promptForOutdir = async (ctx) => { const response = await prompt("Where should the compiled files be placed?", { type: "text", initial: DEFAULT_OUTDIR, default: DEFAULT_OUTDIR, placeholder: "Relative path from the package root to the desired compiler output directory", }); if (!response.startsWith("./")) { ctx.logger.warn("You must enter a valid relative path starting from the package root."); return await promptForOutdir(ctx); } return { ...ctx, outdir: response, }; };