feat: paraglide
adder
Notes:
svelte-add
. I tried patching in their changes, which obviously only worked to some degree. But at least git recognizes that they authored those commits nowhooks.ts
filenew features:
placeholders
, and can provide a validate
function (implemented by @LorisSigrist)preInstall
& postInstall
hooks. This was necessary because this adder needs to generated multiple files past on a string
option inputtodos:
Can we add new lines at the end of the language config files (e.g. en.json
)?
I'm still getting the error messages in next steps:
│ - Setting up $lib/i18n failed because it aleady exports an i18n function │ │ - Adding the reroute hook automatically failed. Add it manually
Not on the right computer right now to test, but are you executing this locally or is it potentially related to pnpm cache?
I was testing via pkg.pr.new
This must be some kind of caching issue than. I ran it locally and it worked flawlessly. (Besides the issues with #88). This should be good to go again.
I just tried running locally with ../../cli/packages/cli/dist/bin.js add paraglide
, but it didn't work for me
Latest commit: 63e065a
The changes in this PR will be included in the next version bump.
Name | Type |
---|---|
sv | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
It seems this error message occurs because we're passing -1 as the start (Rich-Harris/magic-string#288)
This is working now!
Do you think there's a way to improve the formatting? I'm not sure why it's adding everything on one line and if we can insert some new lines to make it a bit better
<section>
<h1>
<span class="welcome">
<picture>
<source srcset="{welcome}" type="image/webp" />
<img src="{welcome_fallback}" alt="Welcome" />
</picture>
</span>
to your new<br />SvelteKit app
</h1>
<h2>
try editing <strong>src/routes/+page.svelte</strong>
</h2>
<Counter></Counter>
</section><h1>{m.hello_world({ name: 'SvelteKit User' })}</h1><div><button onclick="{() => switchToLanguage('en')}">en</button></div>
Nice!
Seems like dom-serializer
is not doing any formatting and not providing any options regarding that. I added a few new lines and tabs here and there, so that this i the ouput for now:
We could discuss if we should add spaces or tabs, but adding tabs in the code feels way more natural than having to count 4 spaces. The rest should be handled in userland.
Automatically add sequence
if handle hook is already defined
Co-authored-by: Ben McCann 322311+benmccann@users.noreply.github.com
Co-authored-by: Ben McCann 322311+benmccann@users.noreply.github.com