[create-svelte] packaging shouldn't override the build command for skeletonlib
Describe the problem
I've seen a few instances (recent) of people being confused by the build task for the skeletonlib template.
I'm assuming it's carrying over the conventions of build being used to create the dist files in projects that use tsc, babel etc.? Opening an issue instead of a direct PR in case my assumption was wrong and there is some benefit I missed.
The app part of the skeletonlib template is often used for as a testbed and for documentation sites. For the former use case, having a build command allows package authors to verify that they don't get any weird differences between dev and build mode due to bundlers, and a build command would be needed regardless for co-located documentation sites.
Describe the proposed solution
move packaging into a "package" task, and reinstate the "build" task
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
Would we consider this "not a breaking change" because it only affects new projects? Or would it represent a major semver?
Would we consider this "not a breaking change" because it only affects new projects?
Yeah, since we aren't really making an observable change to an API, it shouldn't be a breaking change.
Yeah, since we aren't really making an observable change to an API, it shouldn't be a breaking change.
I can see this perspective... but after more thought I think it is technically a breaking change -- for example, if a company set up automation around creating new packages (i.e. we have an internal "create a new package for our company button" that runs create-svelte and sets up npm automation), this would doubtless break their workflow. This is niche, but the whole point of semver is that you don't ever break anyone's software, and this would.
You may think "who on earth would do that?" -- it doesn't matter. If someone could do it with the existing public API and we remove that ability or change it in a breaking way, it's a major semver. Part of being past 1.0 and attracting larger software vendors to our platform is that we uphold our contract with everyone -- we don't break your software.
It'd be a breaking change to create-svelte, yes. Which is fine. If someone has automation around create-svelte that doesn't account for semver, that's a them problem
From #8373 it doesn't sound like switching the script will do it. We somehow also need to make it more clear that libskeleton should be used for libraries that are packaged and published to npm. I guess the skeleton in the name leads people down the wrong track.
What if we just change this to 'Library'? https://github.com/sveltejs/kit/blob/d80f18fdc445181312d53898abbcd584962a2df5/packages/create-svelte/templates/skeletonlib/.meta.json#L2
Changed in 8922