Skip to content
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

Possible need for a preprocessor #9

Closed
shirakaba opened this issue Jan 30, 2021 · 7 comments
Closed

Possible need for a preprocessor #9

shirakaba opened this issue Jan 30, 2021 · 7 comments
Assignees

Comments

@shirakaba
Copy link
Collaborator

See https://github.com/halfnelson/svelte-native-preprocessor:

It performs the following transforms to provide a better developer experience when using Svelte-Native:

  • Adds <svelte:options namespace="xmlns" /> to the component, ensuring the generated code is compatible with svelte-native
  • Changes bind:text="{email}" to text="{email}" on:textChanged="{e => email = e.value}"

We at least need the namespace aspect, as if PR sveltejs/svelte#5652 lands, we'll require such preprocessing in order to close https://github.com/shirakaba/svelte-nodegui/issues/9.

I'm unsure whether we'll need it for bind:text; I haven't yet tried that feature (and indeed may not be able to if event listener names are forced to lower case – though I'm not sure of the casing used by NodeGUI yet).

@shirakaba
Copy link
Collaborator Author

@mrsauravsahu has taken on this task! I'll be checking it out later.

@mrsauravsahu
Copy link
Collaborator

For the time being, the preprocessor sits here - https://github.com/mrsauravsahu/svelte-nodegui-preprocessor
It's a private repo. We need to discuss what's the best place to put this in.

@mrsauravsahu
Copy link
Collaborator

I've made changes so that the "foreign" namespace gets injected with this preprocessor. We will merge this once we're able to integrate the preprocessor with svelte-nodegui.

@mrsauravsahu
Copy link
Collaborator

Let me publish svelte-nodegui-preprocessor to npmjs so that we can use it here. We'll close this issue then.

@shirakaba
Copy link
Collaborator Author

shirakaba commented Feb 21, 2021

@mrsauravsahu I've just published the first (alpha) release of Svelte NodeGUI, @nodegui/svelte-nodegui@0.0.1-alpha, to npm. Sorry for the wait! This may unblock you for publishing the preprocessor.

@shirakaba
Copy link
Collaborator Author

I've published the preprocessor and incorporated it into both this repo's playground app and the official svelte-nodegui-starter. It works perfectly, thanks @mrsauravsahu!

@mrsauravsahu
Copy link
Collaborator

Ah thanks @shirakaba for taking the lead on this. Great to hear that! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants