opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
42 stars 0 forks source link

Make the `outdir` configurable in `paraglide-js init` #60

Closed LorisSigrist closed 6 months ago

LorisSigrist commented 6 months ago

Context/Problem

There are good reasons why the outdir might need to be moved.

Usually it's to better fit pre-defined import aliases from the framework. For example placing it in src/lib/paraglide when using SvelteKit so that we can import with $lib/paraglide. NextJS is also starting to push a folder-structure where there is no src/ folder.

Thus, people often need to change the outdir, which can be annoying to do.

Proposal

Explicitly prompt for the outdir when running paraglide-js init with src/paraglide as the default value.

IMO explicitly prompting users for configuration with sensible defaults is preferable over assuming defaults, because then they are at least aware that something can be configured.