Embedding rapydscript to the webpage
See original GitHub issueHi, @atsepkov i have an idea to embed rapydscript to the webpage. So that we could program and write JS in RapydScript code on the fly like Brython does. What do you think ?
Check this out ! https://github.com/mardon86/RapydScript_onwebpage
So far,
- i’m loading rapydscript code as string via “xxxx” variable in file mycode.pyj
- I dont know how to load Rapydscript file automatically via
<script type="text/rapydscript" src="mycode.pyj"></script>and treat the code inside as rapydscript code - it returns into error when i’m using option “omit_baselib”: false
I’m sure you can do better and i hope you could post official guide to embed rapydscript to the webpage
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Embedding Rapydscript - Google Groups
Hi! Coding Python with switching to coding JS - really painful. So, I tried Rapydscript (RS) and I like it very much! Unfortunately,...
Read more >Using RapydScript-ng in the browser · Issue #12 - GitHub
I'm the developer of glowscript.org, which uses Tsepkov RapydScript to permit users to write Python programs that generate real-time ...
Read more >Embedding Python Code into Webpage | PyScript - YouTube
In this Video , we will be embedding Python Code into a Webpage via PyScript Framework #pyscript #python #code #developer # webpage #anaconda ......
Read more >How To Embed A Vpython On An Html Page? - ADocLib
Go to the Anaconda web site and using the Products. ... Library on Programs can be written in JavaScript or RapydScript or they...
Read more >New website for RapydScript, the pythonic javascript. - Reddit
141 votes, 36 comments. 1.1M subscribers in the Python community. News about the programming language Python. If you have something to teach others…...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mardon86 You can take a look at my solution pyjTransformer, compiles .pyj files or rapydscript code to javascript: https://github.com/adousen/RapydScript-pyjTransformer
If you’re compressing the files individually, you’re either using an outdated version or not doing something right, https://github.com/atsepkov/RapydScript/blob/master/lib/rapydscript.js is the only file you should be minifying and it’s also the only file you need (baselib, utils, ast, output, tokenizer are all intermediate files now). RapydScript itself is both a compiler and a minifer, so the easiest way to minify it is to open
src/self.pyj, remove the line that saysbeautify: Trueand recompile twice (first time for the compiler to recompile its self-compilation logic and second time to actually apply it). I’ll also modify the code in a bit to accept -p option for --self.