-
Notifications
You must be signed in to change notification settings - Fork 1
Added js interpreter #1
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
Conversation
Hey @sumn2u ! Now the Interpreter will be working i moved the code from interpreter.js file to the main page.html file maybe it was not importing the code from the interpreter.js correctly, Also i don't know about why sidebar is hiding i didn't made any change that will affect the sidebar. If the sidebar is still not visible after this commit, then i will try removing the style from the JS Interpreter, maybe that is causing the issue. |
Can you share me an example script that i can run inside the code editor? Tried this one but it throws an error. |
It shouldn't be happening, but anyways this time i have written this code again, it must be working now i have added the same code in the learn js to try whether the interpreter is working or not. I have added in folder book/en/conditional-logic/if.html and i tried with the code you were trying plus the codes written in the book. These are the result. Also , please refresh the page if it still not works then it will work it. Also, Please don't mind me replying this late I had to go to college so i wasn't able to reply. |
Nice Work! However, there are some issues: It appears on every page, even on those where we only want to show text content, and it's currently placed at the bottom of every page. We might need to reconsider how and where we invoke it, allowing more flexibility in positioning it where necessary, rather than limiting it to the bottom. |
100 Percent Agree! I searched the whole directory in this repository but i wasn't able to find the code for the single page. The best way i think is we have to add it in every single page wherever we want it to and that can only be done in main learn-js repository but it won't save, it will go back to its original state. Also what should i have to do now like earlier you said me to add the dependency of this commit in learn-js i will have to change this #b1ee with the new commit i made, this one |
We could consider creating a library that can be invoked wherever needed. Let's explore this option. I'll develop a basic structure for you to build upon and will notify you once it's complete. |
Okay! Sounds Good 👌😁 |
One more thing , until then what will happen to this commit like it will get merged or closed till you create a library, i will try to contribute different code bases to develop my skills . |
Here's a pull request that includes fixes: Link to PR. In this update, I’ve implemented a custom plugin for enhanced functionality, which can be found here: GitBook Ace Editor Plugin.
If we are happy with the new solution, we can close this PR.
Sure. |
I applied the interpreter in exercises chapter. https://learn-javascript-54q0wzfec-suman-kunwars-projects.vercel.app/en/exercises/ |
It looks good! |
I have added the Js interpreter in the _layouts/website/page.html and interpreter.js, so that i can add the interpreter in the original github. Also the server was not running, i have never worked with the plugins before, so i have just added the interpreter below the main content section in the page.html. Below are the ss of the code i added. Please check out the folder structure i don't know if i am on the right one or not.