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

[Feature Request]: Support for nodejs and add html and css to javascript #4

Open
bsde1234 opened this issue Nov 13, 2022 · 9 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bsde1234
Copy link

bsde1234 commented Nov 13, 2022

Hi,
Thanks for making this project. Please add support for nodejs. Also please add html and css support to javascript addon so that html, css and javascript can be used in one.

@MarketingPip
Copy link
Member

@bsde1234 - you are more than welcome! :)

First thing is first -

I do believe Node.js can be executed via the Piston API by using the language javascript

Please report results to me on this.

Second thing -

I am actually in the progress of adding features to implement addons / plugins - so other compilers & more can be added.

That said - I have not found a good compiler that is capable of handling HTML / CSS / JS in a sandboxed iframe environment. If you could recommend one - I could look at possibly taking a jab at this.

Though - if you are willing to provide some CSS that can be easily applied & as well tab functionality to help speed this feature request by chance (it would be more than appreciated) or even willing to create a plugin for this yourself -
it would be more than appreciated to have some contributors on this projects, to help with creating plugins like this!

If you can't help with the second request, you might have to wait awhile for me or someone else to implement this feature!

Thank you for your support as well to the repo! 👍

ps: feel free to share with your friends etc to help the project grow!

@MarketingPip MarketingPip added enhancement New feature or request good first issue Good for newcomers labels Nov 13, 2022
@bsde1234
Copy link
Author

For javascript it gives error for following code console.log('Current version: ' + process.version); like

�[0m�[1m�[31merror�[0m: Uncaught ReferenceError: process is not defined
console.log('Current version: ' + process.version);
�[0m�[31m ^�[0m
at �[0m�[36mfile:///piston/jobs/168b0392-f191-4900-b784-8897482edfe9/file0.code�[0m:�[0m

Actually I am not an advanced developer to give a pull request. I will wait to someone will do that for you.

Thanks.

@MarketingPip MarketingPip changed the title Support for nodejs and add html and css to javascript [Feature Request]: Support for nodejs and add html and css to javascript Nov 13, 2022
@MarketingPip
Copy link
Member

MarketingPip commented Nov 14, 2022

More than understandable!

Well in the mean time - please be sure to ⭐ the repo to show your continued support!

As for the Node.JS - pretty sure Node.JS is running fine - just the modules are not exposed to you properly. - I am not a Node.JS developer tho so hoping someone else can chime in here.

@bsde1234
Copy link
Author

@MarketingPip
Copy link
Member

@bsde1234 I have actually been working on this. Lost a lot of work tho due to my computer crashing .-. but, keep a eye out!

Here is a sneak peak!

image

Keep in mind as well - you have no idea how much sending resources like that help me save time so thank you very much. 😄

ps; I seen you were wanting a PHP compiler + this way back on another repo. I will add a PHP compiler asap. But please again bare with me as my computer is literally old as a dinosaur. (Donations are more than welcome haha!)

@bsde1234
Copy link
Author

Image looks nice. In your readme there is php in supported language. Don't you actually support it?

@MarketingPip
Copy link
Member

MarketingPip commented Nov 26, 2022

Image looks nice. In your readme there is php in supported language. Don't you actually support it?

Correct the current Web Component does support PHP but it is rendered via API and not client side. Adding a PHP compiler client side will allow for more REAL / TRUE like PHP compiling in the browser. 👍

ps; updated the demo to show PHP is currently supported + you can browse all the other supported languages / demo them! 👍

@bsde1234
Copy link
Author

Thanks for the info. You will get more client side compiler at https://github.com/lyricat/code-knack

@MarketingPip
Copy link
Member

Hey @bsde1234,

Sorry for delay on this! I will try to make some updates regarding the HTML, CSS & JS playground ASAP.

That said you are good to go and use Node.js in the latest version! Just set the language attribute to node-js.

Other than that,
I hope your doing well. ✌️

ps; I will hopefully wrap up the request of adding the HTML, CSS & JS support in this library or maybe even another etc! Tho I will keep you posted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants