philter87 / publish-svelte

15 stars 2 forks source link

Run pelte programmatically #5

Closed Scott-Fischer closed 3 years ago

Scott-Fischer commented 3 years ago

Description

I'm working on a project which uses svelte to create a frontend tool for non-technical users to create new svelte components and save them to a db. I came across your project as a possible solution to the issues that we've faced and I noticed that there might be a potential use case to cover with it. The only difference for us is that we only want the programatic JS output of compilation so it's beneficial to not have to bundle a bunch of files. A friend of mine and I took a stab at making some changes in order to achieve this, but also to maintain backwards compatability for anyone using pelte in the traditional sense.

Breaking changes worth mentioning:

  1. npm main script has been changed from dist/index.js to dist/pelte.js - if you know a way to make this more backwards compatible, we are open to changes

Also - Our typescript isn't the best so we didn't add any types. If that's important, we'd love some recommendations

BTW- If you think this is out of scope for the project, feel free to close it. I just figured it was worth contributing these changes back to your original project since it really helped us come up with a working solution for our use case.

danthareja commented 3 years ago

One more quick note - 5e9cdff was added to fix the following errors when running npm run tsc after a fresh clone/npm-install.

tsc
philter87 commented 3 years ago

Cool. I will take a look tomorrow.

philter87 commented 3 years ago

Beautiful. Good job!