Reputation: 927
I'm trying to translate the following test code with Transcrypt:
class A(object):
def __init__(self):
self.a = 5
The output is a 2447 line file:
$ transcrypt test.py -fb -e 6
$ wc -l __javascript__/test.js
2447 __javascript__/test.js
How can I get Transcrypt to generate sane output for this input? Thanks
Upvotes: 2
Views: 212
Reputation: 7000
File test.js
has got the whole runtime lib in it.
Look at the module file instead, it's called test.mod.js
and has only code for this one module. You can reduce its size further by using the -xc
compiler switch.
If you e.g. take a look at:
http://www.transcrypt.org/live/turtle_site/turtle_site.html
and change the program, e.g. change 'red'
to 'pink'
, and then press [Compile and run]
, then the module file is the only thing that's reloaded.
That's why the response is fast.
Upvotes: 2