不使用 java 进行转码?
Transcrypt without java?
我尝试了 Transcrypt 教程中的“hello”示例,但收到以下错误消息:
bash-4.3$ transcrypt hello
Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.9.0
Copyright (C) Geatec Engineering. License: Apache 2.0
Saving target code in:
/home/User/hello/__target__/org.transcrypt.__runtime__.js
Saving minified target code in:
/home/User/hello/__target__/org.transcrypt.__runtime__.js
Error while compiling (offending file last):
File 'org.transcrypt.__runtime__', line 0, namely:
[Errno 2] No such file or directory: 'java': 'java'
Aborted
错误是由需要java的Google编译器缩小器引起的吗?没有 java 有什么方法可以 运行 转码吗?
我用谷歌搜索了那个错误,发现 this promising GitHub issue comment 上面写着
You can now compile without minification, so without Java by using the -n
switch.
所以,试试
transcrypt -n hello
我尝试了 Transcrypt 教程中的“hello”示例,但收到以下错误消息:
bash-4.3$ transcrypt hello
Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.9.0
Copyright (C) Geatec Engineering. License: Apache 2.0
Saving target code in:
/home/User/hello/__target__/org.transcrypt.__runtime__.js
Saving minified target code in:
/home/User/hello/__target__/org.transcrypt.__runtime__.js
Error while compiling (offending file last):
File 'org.transcrypt.__runtime__', line 0, namely:
[Errno 2] No such file or directory: 'java': 'java'
Aborted
错误是由需要java的Google编译器缩小器引起的吗?没有 java 有什么方法可以 运行 转码吗?
我用谷歌搜索了那个错误,发现 this promising GitHub issue comment 上面写着
You can now compile without minification, so without Java by using the
-n
switch.
所以,试试
transcrypt -n hello