learn-javascript icon indicating copy to clipboard operation
learn-javascript copied to clipboard

#80 Added JS Interpreter

Open THEBOSS0369 opened this issue 1 year ago • 12 comments

I added ths js interpreter, now anyone learning will write the code in the textarea and the output will in the output section

THEBOSS0369 avatar Aug 08 '24 12:08 THEBOSS0369

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
learn-javascript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 11, 2024 6:34am

vercel[bot] avatar Aug 08 '24 12:08 vercel[bot]

@THEBOSS0369 Thank you for creating this PR. Unfortunately, i couldn't see the changes on while previewing this PR. Can you guide me how to see the changes?

sumn2u avatar Aug 08 '24 12:08 sumn2u

I forgot to add the super function it should be visible now

THEBOSS0369 avatar Aug 08 '24 12:08 THEBOSS0369

I forgot to add the super function it should be visible now

Thanks for the prompt response. I'm still not seeing it. :(

sumn2u avatar Aug 08 '24 12:08 sumn2u

Screenshot 2024-08-08 181518 Screenshot 2024-08-08 181705 See this i have added it should be visible

THEBOSS0369 avatar Aug 08 '24 12:08 THEBOSS0369

Let me have a look into it.

sumn2u avatar Aug 08 '24 12:08 sumn2u

Actually When i'm running server, i can't run the server after installing this project all dependencies and libraries as this project's gitbook and my node js have different version so they aren't working together. and when i tried to run it with docker the docker comes with many issues and i haven't used docker before. So i thought adding code and previewing from github might work

THEBOSS0369 avatar Aug 08 '24 12:08 THEBOSS0369

Actually When i'm running server, i can't run the server after installing this project all dependencies and libraries as this project's gitbook and my node js have different version so they aren't working together. and when i tried to run it with docker the docker comes with many issues and i haven't used docker before. So i thought adding code and previewing from github might work

I tried with the code in this PR and it's not showing anything. I see one of the plugin that we can use but the problem is that plugin is outdated. Is it possible to create an issue of the system not running in your machine? I can have a look into it.

sumn2u avatar Aug 08 '24 15:08 sumn2u

Yea Definitely, I will create it tomorrow. Also thanks for replying this fast before this I tried to contribute two more repositories but no one was replying and I'm a beginner so this conversation is very helpful for me growing as a programmer, Thanks Man it means Alot!

THEBOSS0369 avatar Aug 08 '24 16:08 THEBOSS0369

Hey @sumn2u I have add the issue

THEBOSS0369 avatar Aug 09 '24 06:08 THEBOSS0369

Hey @sumn2u ! There is a problem occuring, i added js interpreter in every html file of the book directory and when the server is running it was showing on the website. But when i stopped the server and ran it again the html file went back to its original state. I have shared the screenshot in which i added the js interpreter but as soon i restart the server the code automatically get remove from the files. working 1 working 2 These are the ss of the js interpreter i added. However, As soon i restart the server the interpreter will be gone. When i searched this issue on google, then i came to know that , those file that are locked cannot be modified by contributor, i don't know how to resolve this.

THEBOSS0369 avatar Aug 11 '24 06:08 THEBOSS0369

Hey @sumn2u ! There is a problem occuring, i added js interpreter in every html file of the book directory and when the server is running it was showing on the website. But when i stopped the server and ran it again the html file went back to its original state. I have shared the screenshot in which i added the js interpreter but as soon i restart the server the code automatically get remove from the files. working 1 working 2 These are the ss of the js interpreter i added. However, As soon i restart the server the interpreter will be gone. When i searched this issue on google, then i came to know that , those file that are locked cannot be modified by contributor, i don't know how to resolve this.

Hi @THEBOSS0369, we are using gitbook-plugin-theme-creative so any changes should be made there. I suggest creating a PR for that plugin and then using it as a dependency here. You may need to make some modifications, as it differs from the layout we have here.

sumn2u avatar Aug 11 '24 22:08 sumn2u

Hi @sumn2u ! I have created pr for JS Interpreter in the gitbook plugin theme creative https://github.com/sumn2u/gitbook-plugin-theme-creative/pull/1 . Please guide me what i have to do next ,so that the interpreter will show on the website.

THEBOSS0369 avatar Aug 12 '24 15:08 THEBOSS0369

Hi @sumn2u ! I have created pr for JS Interpreter in the gitbook plugin theme creative sumn2u/gitbook-plugin-theme-creative#1 . Please guide me what i have to do next ,so that the interpreter will show on the website.

Nice work. Now, you can grab the commit SHA from that PR and add it as dependency in learn javascript.

Screenshot 2024-08-12 at 10 46 13 AM

Here the commit SHA starts with b1e336. I will copy it and add it in learn-javascript package.json.

 "devDependencies": {
    "@honkit/honkit-plugin-ga": "^1.0.1",
    "cz-conventional-changelog": "^3.3.0",
    "gitbook-plugin-chapter-fold": "^0.0.4",
    "gitbook-plugin-edit-link": "^2.0.2",
    "gitbook-plugin-exercises": "^3.0.0",
    "gitbook-plugin-favicon-custom": "^1.0.0",
    "gitbook-plugin-hide-published-with": "0.0.1",
    "gitbook-plugin-hints": "^1.0.2",
    "gitbook-plugin-intopic-toc": "^1.0.6",
    "gitbook-plugin-sharing": "https://github.com/sumn2u/plugin-sharing.git",
    "gitbook-plugin-sidebar-ad": "https://github.com/sumn2u/gitbook-plugin-sidebar-ad.git",
    "gitbook-plugin-sitemap": "^1.2.0",
    "gitbook-plugin-theme-creative": "https://github.com/sumn2u/gitbook-plugin-theme-creative.git#b1e336b9527493233bbd7e95a815b00987137bdd",
    "honkit": "^4.0.4",
    "honkit-plugin-i18nsettings": "^1.0.0"
  },

After this, run npm install to update the dependencies, then start the application and preview it. I can see the changes but it hided the sidebar and also the output is showing nothing.

screencapture-localhost-4000-en-2024-08-12-10_51_25

Screenshot 2024-08-12 at 10 52 43 AM

sumn2u avatar Aug 12 '24 15:08 sumn2u

Hey @sumn2u ! Check this message https://github.com/sumn2u/gitbook-plugin-theme-creative/pull/1 and tell me whether the interpreter is still working or not. If it works, then i will proceed with the grabbing sha from the PR.

THEBOSS0369 avatar Aug 13 '24 03:08 THEBOSS0369

Hey @sumn2u ! Check this message sumn2u/gitbook-plugin-theme-creative#1 and tell me whether the interpreter is still working or not. If it works, then i will proceed with the grabbing sha from the PR.

Thanks @THEBOSS0369. Your solution looks great! To cover most of the parts discussed here, I created PR #229. This PR utilizes a custom library that can be placed anywhere. Feel free to add any functionalities that are needed.

sumn2u avatar Aug 13 '24 17:08 sumn2u

Welcome @sumn2u ! I have reviewed PR #229 and it looks good. I will soon start working on it and keep you updated with the progress. Also i have send you request on Linkedin My real name is Anuj

THEBOSS0369 avatar Aug 14 '24 11:08 THEBOSS0369