Comments (4)
Try --bare flag.
On Tue, 31 May 2016 at 9:33 AM, BruceSherwood [email protected]
wrote:
In the README is a discussion about issues in calling routines in external
libraries. I need to go the other way, to produce from Python code a
JavaScript library. I successfully executed "npm install rapydscript-ng"
and "npm install" and successfully ran "rapydscript" which produced what
looks like correct JavaScript output, but when I try to reference a
function named "PhysGraph" in the library (which is a class in the original
Python file) I get an error message "PhysGraph is not defined", despite the
fact that there is a "function PhysGraph" in the JavaScript. Do you have
any suggestions about what I've done wrong? Thanks. (Incidentally, when I
initially ran the Python code through the REPL, the output was entirely
different and, in particular, didn't include any of the RS run-time
functions. I guess the REPL is just used for seeing how code fragments
compile?)—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#30, or mute the
thread
https://github.com/notifications/unsubscribe/AADlJs6My9p-OCO2KEF-h4_OCG7dcPhlks5qG7MSgaJpZM4IqKTE
.
from rapydscript-ng.
Thanks, I'll try that. Where does one find documentation on flags such as "bare"?
from rapydscript-ng.
--help on command line. Sub commands like compile have their own help too.
On Tue, 31 May 2016 at 7:41 PM, BruceSherwood [email protected]
wrote:
Thanks, I'll try that. Where does one find documentation on flags such as
"bare"?—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AADlJmiTacpwZ77BFQBkA54Dr6KoW27Cks5qHEGXgaJpZM4IqKTE
.
from rapydscript-ng.
By default all output produced by the compiler is in a private scope. You can use --bare or simply export the symbol manually by doing something like (I would recommend the latter approach since otherwise you pollute the global namespace with lots of unneeded things).
window.PhysGraph = PhysGraph in the .pyj file.
from rapydscript-ng.
Related Issues (20)
- Import problem? HOT 4
- class decorator bug HOT 5
- when converting .children() to list, i get list of empty dictionaries HOT 4
- Remove typing/annotations from input HOT 1
- Ellipsis HOT 7
- bitops on booleans HOT 1
- string.split() HOT 3
- random.randint tolerates 3rd argument HOT 3
- distionary += error HOT 21
- Build question HOT 5
- pop for dict, pypop for list HOT 8
- Idle curiosity about duplication HOT 1
- Missing element from rapydscript.js?
- Mistranspilation HOT 2
- Remove a list from a list HOT 4
- while/else HOT 3
- randrange error
- Function argument handling
- Comical Bundle Size HOT 1
- Large slowdown HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rapydscript-ng.