Brython to JS Compiler

閲覧: 95 回
最初の未読メッセージにスキップ

Brandon Keith Biggs

未読、
2016/09/11 17:41:072016/09/11
To: bry...@googlegroups.com
Hello,
What consideration has there been in creating a Brython to Javascript compiler?

If so I would really love to know. I would like to use Brython in projects that do not primarily use Brython. like in anything with Node.js, React Native, or on projects with other developers not using Brython, I think the ability to compile Brython code into Javascript that can be called from other scripts would be amazing and much more functional than it is currently.
It would allow some truly optimized code to be created, it would allow a much wider use and it would allow Brython to become a much more universal tool.
JQuery is similar to what Brython could be. Developers use jQuery to shorten their development time of Javascript. They can use raw Javascript, but anyone writing in the project can choose if they want jQuery or Javascript. Because jQuery is so small, a lot of projects just start with jQuery by default.
If Brython could have a compiler, one could get two files, one would be the Brython core and the other would be the compiled Brython from the project scripts.
It would essentially become like jQuery in becoming a much faster method of developing in Javascript.

The advantage with Brython vs something like pyjs is that in development, I can run Brython like it is now, without any compiling. I could manage my code, test my code and write my code without needing a compiler. Only when I need it to run in a specific way would I compile it.

This would also allow one to write Javascript Libraries that other people could use.
I think a compiler is really the next step in getting Brython more widely used around the internet.

I have not used Brython for any projects that are not only me because of this. I also have a hard time suggesting Brython for any large projects because I don't know of any way to migrate from Brython to pure JS if the need arises.
Thanks,

Pierre Quentel

未読、
2016/09/15 1:43:042016/09/15
To: brython
Brandon,

There is a discussion currently on Github to address this. The idea would be to keep the development process as it is now - edit the Python code and run the HTML page just by reloading it in the browser, without compiling - but to have a way to create a package with precompiled scripts when deploying the application. At this stage I am unable to say how much it will improve the user experience, but the work is in progress.

Thanks
全員に返信
投稿者に返信
転送
新着メール 0 件