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

Compiling custom plugins without built-in Babel and TS #1645

Closed
danielboven opened this issue Sep 29, 2019 · 4 comments
Closed

Compiling custom plugins without built-in Babel and TS #1645

danielboven opened this issue Sep 29, 2019 · 4 comments

Comments

@danielboven
Copy link

I'm new to JavaScript programming with React, using compilers etc.
Now I'm trying to create a custom plugin in Mailspring (with debug flags). When I create a plugin and name this, it creates a project directory with a lib/main.es6 file and some React files (as a sample plugin) inside the same directory. When I try to use this sample plugin I get the following error message:

Sorry, Mailspring no longer ships with Babel and TypeScript to recompile your plugins on the fly. Ask the plugin developer to compile the plugin to vanilla JavaScript as a pre-publish step.

I figured I need to use a compiler on the main.es6 file, but which one and how? Also, how can I get the compiled (vanilla) JS file to get picked up by Mailspring in order to execute the code?
It would be great if someone could help with getting the sample plugin working, thanks.

@bengotow
Copy link
Collaborator

bengotow commented Oct 8, 2019

Hey! Let me see if I can update the example plugin - sorry for the hassle!

@bengotow
Copy link
Collaborator

bengotow commented Oct 9, 2019

Hey! Just a heads up that I've created a new sample plugin over here. I really wish we could export the types for mailspring-exports and mailspring-component-kit so you could write the plugins in TypeScript, but it looks like that might take a lot of work 😬

https://github.com/Foundry376/Mailspring-Plugin-Starter

Hope that helps! If you could open issues there with any questions you have that'd be really great!

@Striffly
Copy link

Striffly commented Oct 10, 2019

Thank you for this example plugin.
Can you add reference to this into README page or as default template when clicking to "Create plugin" ?

@danielboven
Copy link
Author

Hey, thank you for the example plugin! I will dive into this.
If I have any questions, I will open up an issue over there, thanks ^

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

3 participants