Upload files to "/"

This commit is contained in:
2024-10-06 20:51:53 +00:00
commit 135d1c9f09
3 changed files with 170 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": {"exports": true, "console": true, "Uint32Array": true, "require": true, "Float32Array": true, "module": true, "navigator": true, "XMLHttpRequest": true, "Int32Array": true, "Pebble": true, "Float64Array": true, "setInterval": true, "localStorage": true, "WebSocket": true, "Int16Array": true, "Int8Array": true, "Uint16Array": true, "Uint8ClampedArray": true, "Uint8Array": true, "setTimeout": 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"
}

75
package.json Normal file
View File

@@ -0,0 +1,75 @@
{
"author": "singleserveapps",
"dependencies": {
"pebble-battery-bar": "^1.0.8",
"pebble-bluetooth-icon": "^1.0.6"
},
"keywords": [],
"name": "basic-steps",
"pebble": {
"capabilities": [
"configurable",
"health"
],
"displayName": "Basic Steps",
"enableMultiJS": true,
"messageKeys": {
"KEY_BACKGROUND_COLOR": 5,
"KEY_HOUR_FONT": 6,
"KEY_HR_COLOR": 2,
"KEY_JS_READY": 1,
"KEY_MINUTES_FONT": 7,
"KEY_MIN_COLOR": 3,
"KEY_OPTIONS": 99,
"KEY_WSD_COLOR": 4
},
"projectType": "native",
"resources": {
"media": [
{
"file": "fonts/Roboto-Bold.ttf",
"name": "FONT_ROBOTO_BOLD_48",
"targetPlatforms": null,
"type": "font"
},
{
"file": "fonts/Roboto-Light.ttf",
"name": "FONT_ROBOTO_LIGHT_48",
"targetPlatforms": null,
"type": "font"
},
{
"file": "fonts/Roboto-Thin.ttf",
"name": "FONT_ROBOTO_THIN_48",
"targetPlatforms": null,
"type": "font"
},
{
"file": "fonts/Roboto-Regular.ttf",
"name": "FONT_ROBOTO_REGULAR_36",
"targetPlatforms": null,
"type": "font"
},
{
"file": "fonts/Roboto-Regular.ttf",
"name": "FONT_ROBOTO_REGULAR_48",
"targetPlatforms": null,
"type": "font"
}
]
},
"sdkVersion": "3",
"targetPlatforms": [
"aplite",
"basalt",
"chalk",
"diorite",
"emery"
],
"uuid": "076a67db-0a26-4e79-90da-048c2652fafe",
"watchapp": {
"watchface": true
}
},
"version": "3.5.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')