在pebble js文件中包含外部javascript库? [英] Including an external javascript library in pebble js file?

查看:115
本文介绍了在pebble js文件中包含外部javascript库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以在我的卵石代码中包含一个外部JS库? 按照惯例,在网页上,我会在我的头部标签中这样做:

Is there any way I can include an external JS library in my pebble code? Conventionally on a webpage I would do this in my head tags:

<script type='text/javascript' src='https://cdn.firebase.com/js/client/1.0.11/firebase.js'></script>

但是在pebble中,由于我仅使用JS,因此无法执行此操作.因此,如何为JavaScript文件添加外部库.

But in pebble, I am unable to do that since I am only using JS. So how can I include an external library for a JavaScript file.

推荐答案

当前,您不能包括外部JS文件.

At present, you cannot include external JS files.

如果您使用的是CloudPebble,那么执行此操作的唯一方法是将JS库文件的内容复制并粘贴到JS文件中.

If you're using CloudPebble, then the only way to do this is to copy and paste the content of the JS library files into your JS file.

如果您正在进行本机开发,则可以修改wscript文件以在构建时将多个JS文件合并为一个.

If you're doing native development, you can modify the wscript file to combine multiple JS files into one at build time.

这篇关于在pebble js文件中包含外部javascript库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆