Upload files to "/"
This commit is contained in:
43
jshintrc
Normal file
43
jshintrc
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* Example jshint configuration file for Pebble development.
|
||||||
|
*
|
||||||
|
* Check out the full documentation at http://www.jshint.com/docs/options/
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
// Declares the existence of the globals available in PebbleKit JS.
|
||||||
|
"globals": {"XMLHttpRequest": true, "console": true, "setTimeout": true, "Pebble": true, "Int8Array": true, "WebSocket": true, "localStorage": true, "Float64Array": true, "Uint16Array": true, "Uint8Array": true, "Float32Array": true, "setInterval": true, "Int16Array": true, "Uint32Array": true, "Uint8ClampedArray": true, "Int32Array": true, "navigator": true},
|
||||||
|
|
||||||
|
// Do not mess with standard JavaScript objects (Array, Date, etc)
|
||||||
|
"freeze": true,
|
||||||
|
|
||||||
|
// Do not use eval! Keep this warning turned on (ie: false)
|
||||||
|
"evil": false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The options below are more style/developer dependent.
|
||||||
|
* Customize to your liking.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// All variables should be in camelcase - too specific for CloudPebble builds to fail
|
||||||
|
// "camelcase": true,
|
||||||
|
|
||||||
|
// Do not allow blocks without { } - too specific for CloudPebble builds to fail.
|
||||||
|
// "curly": true,
|
||||||
|
|
||||||
|
// Prohibits the use of immediate function invocations without wrapping them in parentheses
|
||||||
|
"immed": true,
|
||||||
|
|
||||||
|
// Don't enforce indentation, because it's not worth failing builds over
|
||||||
|
// (especially given our somewhat lacklustre support for it)
|
||||||
|
"indent": false,
|
||||||
|
|
||||||
|
// Do not use a variable before it's defined
|
||||||
|
"latedef": "nofunc",
|
||||||
|
|
||||||
|
// Spot undefined variables
|
||||||
|
"undef": "true",
|
||||||
|
|
||||||
|
// Spot unused variables
|
||||||
|
"unused": "true"
|
||||||
|
}
|
||||||
50
package.json
Normal file
50
package.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"author": "singleserveapps",
|
||||||
|
"dependencies": {},
|
||||||
|
"keywords": [],
|
||||||
|
"name": "sliding-text-wd",
|
||||||
|
"pebble": {
|
||||||
|
"capabilities": [
|
||||||
|
"location",
|
||||||
|
"configurable"
|
||||||
|
],
|
||||||
|
"displayName": "Sliding Text WD",
|
||||||
|
"enableMultiJS": false,
|
||||||
|
"messageKeys": {
|
||||||
|
"KEY_BACKGROUND_COLOR": 3,
|
||||||
|
"KEY_CONDITIONS": 2,
|
||||||
|
"KEY_DISPLAY_O_PREFIX": 7,
|
||||||
|
"KEY_DISPLAY_WEATHER": 8,
|
||||||
|
"KEY_GET_WEATHER": 12,
|
||||||
|
"KEY_HOURMINUTES_ALIGNMENT": 11,
|
||||||
|
"KEY_MIN_SINCE_WEATHER_UPDATE": 9,
|
||||||
|
"KEY_TEMPERATURE": 13,
|
||||||
|
"KEY_TEMPERATURE_IN_C": 1,
|
||||||
|
"KEY_TEXT_COLOR": 4,
|
||||||
|
"KEY_USE_CELSIUS": 6,
|
||||||
|
"KEY_WEATHERDATE_ALIGNMENT": 10,
|
||||||
|
"KEY_WEATHER_FREQUENCY": 5
|
||||||
|
},
|
||||||
|
"projectType": "native",
|
||||||
|
"resources": {
|
||||||
|
"media": [
|
||||||
|
{
|
||||||
|
"file": "images/image_menu.png",
|
||||||
|
"menuIcon": true,
|
||||||
|
"name": "IMAGE_MENU",
|
||||||
|
"type": "bitmap"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sdkVersion": "3",
|
||||||
|
"targetPlatforms": [
|
||||||
|
"aplite",
|
||||||
|
"basalt"
|
||||||
|
],
|
||||||
|
"uuid": "01420bea-c0a0-4116-8495-c8f21d60f49e",
|
||||||
|
"watchapp": {
|
||||||
|
"watchface": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "3.3.0"
|
||||||
|
}
|
||||||
62
wscript
Normal file
62
wscript
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
|
||||||
|
#
|
||||||
|
# This file is the default set of rules to compile a Pebble project.
|
||||||
|
#
|
||||||
|
# Feel free to customize this to your needs.
|
||||||
|
#
|
||||||
|
|
||||||
|
import os.path
|
||||||
|
try:
|
||||||
|
from sh import CommandNotFound, jshint, cat, ErrorReturnCode_2
|
||||||
|
hint = jshint
|
||||||
|
except (ImportError, CommandNotFound):
|
||||||
|
hint = None
|
||||||
|
|
||||||
|
top = '.'
|
||||||
|
out = 'build'
|
||||||
|
|
||||||
|
def options(ctx):
|
||||||
|
ctx.load('pebble_sdk')
|
||||||
|
|
||||||
|
def configure(ctx):
|
||||||
|
ctx.load('pebble_sdk')
|
||||||
|
|
||||||
|
def build(ctx):
|
||||||
|
if False and hint is not None:
|
||||||
|
try:
|
||||||
|
hint([node.abspath() for node in ctx.path.ant_glob("src/**/*.js")], _tty_out=False) # no tty because there are none in the cloudpebble sandbox.
|
||||||
|
except ErrorReturnCode_2 as e:
|
||||||
|
ctx.fatal("\nJavaScript linting failed (you can disable this in Project Settings):\n" + e.stdout)
|
||||||
|
|
||||||
|
# Concatenate all our JS files (but not recursively), and only if any JS exists in the first place.
|
||||||
|
ctx.path.make_node('src/js/').mkdir()
|
||||||
|
js_paths = ctx.path.ant_glob(['src/*.js', 'src/**/*.js'])
|
||||||
|
if js_paths:
|
||||||
|
ctx(rule='cat ${SRC} > ${TGT}', source=js_paths, target='pebble-js-app.js')
|
||||||
|
has_js = True
|
||||||
|
else:
|
||||||
|
has_js = False
|
||||||
|
|
||||||
|
ctx.load('pebble_sdk')
|
||||||
|
|
||||||
|
build_worker = os.path.exists('worker_src')
|
||||||
|
binaries = []
|
||||||
|
|
||||||
|
for p in ctx.env.TARGET_PLATFORMS:
|
||||||
|
ctx.set_env(ctx.all_envs[p])
|
||||||
|
ctx.set_group(ctx.env.PLATFORM_NAME)
|
||||||
|
app_elf='{}/pebble-app.elf'.format(p)
|
||||||
|
ctx.pbl_program(source=ctx.path.ant_glob('src/c/**/*.c'),
|
||||||
|
target=app_elf)
|
||||||
|
|
||||||
|
if build_worker:
|
||||||
|
worker_elf='{}/pebble-worker.elf'.format(p)
|
||||||
|
binaries.append({'platform': p, 'app_elf': app_elf, 'worker_elf': worker_elf})
|
||||||
|
ctx.pbl_worker(source=ctx.path.ant_glob('worker_src/c/**/*.c'),
|
||||||
|
target=worker_elf)
|
||||||
|
else:
|
||||||
|
binaries.append({'platform': p, 'app_elf': app_elf})
|
||||||
|
|
||||||
|
ctx.set_group('bundle')
|
||||||
|
ctx.pbl_bundle(binaries=binaries, js='pebble-js-app.js' if has_js else [])
|
||||||
|
|
||||||
Reference in New Issue
Block a user