Upload files to "/"

This commit is contained in:
2024-10-06 21:25:13 +00:00
commit 80054591f4
3 changed files with 163 additions and 0 deletions

43
jshintrc Normal file
View 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": {"Int32Array": true, "require": true, "Pebble": true, "WebSocket": true, "exports": true, "navigator": true, "Float64Array": true, "module": true, "localStorage": true, "XMLHttpRequest": true, "Uint8Array": true, "Uint32Array": true, "Int8Array": true, "console": true, "Uint16Array": true, "Int16Array": true, "setInterval": true, "Float32Array": true, "setTimeout": true, "Uint8ClampedArray": 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"
}

68
package.json Normal file
View File

@@ -0,0 +1,68 @@
{
"author": "singleserveapps",
"dependencies": {},
"keywords": [],
"name": "tictoc-wd",
"pebble": {
"capabilities": [
"location",
"configurable"
],
"displayName": "Tictoc Weather",
"enableMultiJS": true,
"messageKeys": {
"KEY_BACKGROUND_COLOR": 3,
"KEY_CONDITIONS": 2,
"KEY_CONDITION_CODE": 16,
"KEY_DISPLAY_BATTERY": 26,
"KEY_DISPLAY_DATE": 19,
"KEY_DISPLAY_DIGITAL_TIME": 18,
"KEY_DISPLAY_DOTS369": 21,
"KEY_DISPLAY_MINUTE_LINES": 27,
"KEY_DISPLAY_MONTH": 20,
"KEY_DISPLAY_SECONDS_HAND": 34,
"KEY_DISPLAY_WEATHER": 7,
"KEY_DOTS_COLOR": 33,
"KEY_GET_WEATHER": 9,
"KEY_HOUR_HAND_COLOR": 29,
"KEY_HOUR_MARKERS_COLOR": 31,
"KEY_JS_READY": 28,
"KEY_MINOR_MARKERS_COLOR": 32,
"KEY_MINUTE_HAND_COLOR": 30,
"KEY_MIN_SINCE_WEATHER_UPDATE": 8,
"KEY_OPTIONS": 99,
"KEY_READABILITY": 11,
"KEY_SECONDS_HAND_COLOR": 35,
"KEY_SHAKE_FOR_LOHI": 17,
"KEY_TEMPERATURE": 10,
"KEY_TEMPERATURE_HI": 13,
"KEY_TEMPERATURE_IN_C": 1,
"KEY_TEMPERATURE_IN_C_HI": 15,
"KEY_TEMPERATURE_IN_C_LO": 14,
"KEY_TEMPERATURE_LO": 12,
"KEY_TEXT_COLOR": 4,
"KEY_USE_CELSIUS": 6,
"KEY_USE_THIN_HANDS": 25,
"KEY_VIBBRATE_BT_STATUS": 22,
"KEY_WEATHER_FREQUENCY": 5,
"KEY_WEATHER_LOCATION": 24,
"KEY_WEATHER_USE_GPS": 23
},
"projectType": "native",
"resources": {
"media": []
},
"sdkVersion": "3",
"targetPlatforms": [
"basalt",
"chalk",
"diorite",
"emery"
],
"uuid": "b6eccf79-5fd2-4f4b-bcdc-ee9e5db11964",
"watchapp": {
"watchface": true
}
},
"version": "3.4.0"
}

52
wscript Normal file
View File

@@ -0,0 +1,52 @@
#
# 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)
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(ctx.env.BUILD_DIR)
ctx.pbl_program(source=ctx.path.ant_glob('src/c/**/*.c'), target=app_elf)
if build_worker:
worker_elf = '{}/pebble-worker.elf'.format(ctx.env.BUILD_DIR)
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=ctx.path.ant_glob(['src/pkjs/**/*.js', 'src/pkjs/**/*.json']), js_entry_file='src/pkjs/app.js')