replace script content
manipulate template tag itself
access template content
replace template content
manipulate style tag itself
access style content
replace style content
reorder vue blocks
transform(fileInfo, api, options) {
}
returns new js code (aka new script) https://github.com/facebook/jscodeshift#return-value
fileInfo:
{
path: '...',
source: '...'
}
api:
{
stats: object
jscodeshift: function
}
Add to fileInfo:
Those are getters and setters
If any of those are set, rebuild sfc and return it to jscodeshift
If script is set or transform returns value and it's the same as old value, return same string to jscodeshift
If none are set but transform returns value, return that to jscodeshift
If none of that happens, return nothing to jscodeshift
Also add to fileInfo:
templateBlock scriptBlock styleBlock
you can use those to change attributes can also change ordering somehow
are these the actual blocks from compiler?