本文介绍了Traceur编译器:归一化/解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据了解,我可以通过两种方式使用traceur编译器:- 编译脚本,然后包含已经编译到我的应用程序中>
- 在浏览器中使用
traceur
,所以所有脚本都将在应用程序的运行时转换
那么如何使用规范化和解析函数?我知道他们应该存储在系统命名空间 - System.normalize = function(){...}
和 System.resolve = function() {...}
我添加了他们,但没有被调用。
解决方案
没有System.resolve这样的功能。
请参阅。
As I understood I can use traceur compiler in two ways:
- compile scripts and then include already compiled into my app
- use
traceur
in browser so all scripts will be transformed in app's runtime
So how can I use normalize and resolve functions? As I know they should be stored under System namespace - System.normalize = function(){...}
and System.resolve = function(){...}
I added them, but they were not called.
解决方案
There is no such function as System.resolve.
See https://github.com/google/traceur-compiler/wiki/Overriding-System-Loader-behavior.
这篇关于Traceur编译器:归一化/解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!