You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{name: ()=>'foo.svelte',content: ({ source }))=>{const{ script, css, template, generateCode }=parseSvelte(source);// do manipulationsconstms=newMagicString(script.code);ms.overwrite(...);// or ast manipulationdoStuff(script.ast);// performs a text replacement of `script`returngenerateCode({script: ms.toString()});// orreturngenerateCode({script: script.generateCode()});}},
This would allow us to touch only updated lines of code. There are currently 37 files written so is still pretty manageable.
This one would be important to figure out before release because we should make any breaking API changes before we start having community editors
We'd have to figure out the exact API. E.g. maybe it shouldn't be called generateCode but rather something like writeFile so that it can operate on files that might not be considered code. And the arg could be content rather than script for that reason
The text was updated successfully, but these errors were encountered:
Something along the lines of:
This would allow us to touch only updated lines of code. There are currently 37 files written so is still pretty manageable.
This one would be important to figure out before release because we should make any breaking API changes before we start having community editors
We'd have to figure out the exact API. E.g. maybe it shouldn't be called
generateCode
but rather something likewriteFile
so that it can operate on files that might not be considered code. And the arg could becontent
rather thanscript
for that reasonThe text was updated successfully, but these errors were encountered: