-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - Feat/cli #263
WIP - Feat/cli #263
Conversation
Anything I can help with? |
@lukeed 🤔 We need to decide what route we should take here. Initially, I was thinking of a very simple CLI that would just preprocess something(s) from $ svelte-preprocess --src src/*.svelte --out dist/ This can be enough for some (most?) cases, but as @dummdidumm noted here, a component can import some, i.e |
I would 100% just worry about compiling standalone files. I'm pretty sure the old If output is targeting ESM, then it's easy to position this as a "prepare your component for bundling" step, since the output is pure JS, CSS, HTML |
@lukeed I like the idea of positioning the CLI as a bundling "preparation" step, sparing us from dealing with all the minutia of js bundling. However, if we follow this path we should create at least some examples, one simple and another a bit more complex. Maybe the component-template can be used as the example itself, not sure. Anyways, do you (or anyone else) have thoughts about the CLI API? For now, I was thinking of:
|
Exert of relative code from Note the main thing it adds that I think is necessary is an I am also of the opinion that this should only deal with svelte files (ideally with customizable extensions) as anything more than that quickly turns it into a task runner like gulp. |
Closes #256, #255
Related to: sveltejs/component-template#31 and sveltejs/component-template#8
Opening it as a draft and with no implementation. I'm currently studying the available routes we can take here.