javascriptpebble-watchpebble-sdkcloudpebble

Including an external javascript library in pebble js file?


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>

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.


Solution

  • At present, you cannot include external JS files.

    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.

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