Commit Graph
27 Commits
Author SHA1 Message Date
Joseph Mearman 7512b6436b Add TypeScript type declarations (#23)
* feat: add ambient module stubs for declaration generation

Provide TypeScript ambient declarations for 'message_keys' (Pebble SDK
module) and './tmp/config-page.html' (build artefact) so tsc can resolve
these imports when generating .d.ts files.

* feat: add tsconfig for declaration generation

Configures tsc --allowJs --emitDeclarationOnly to generate per-file
.d.ts reference output in dist-types/ from the library source files.

* feat: add curated TypeScript declarations for public API

Hand-curated index.d.ts covering Clay, ClayConfig, ClayItem, ClayEvents,
manipulators, and all supporting types. Necessary because tsc cannot
infer the ClayEvents mixin or dynamically-bound manipulator methods.
All types are exported via the Clay namespace.

* test: add type-checking verification for index.d.ts

Exercises the full public API surface — constructor, instance/static
methods, ClayConfig/ClayItem event methods, manipulator methods,
namespace-exported types, and customFn this-context.

* build: add typescript devDependency, types field, and build scripts

Adds typescript 6.0.2 as a devDependency. Sets "types": "index.d.ts"
in package.json. Adds build:types and check:types scripts.

* build: add gulp types task to validate declarations on build

Validates index.d.ts against test/type-checks.ts as part of the default
gulp build. Reference declaration generation via build:types remains
available as a separate manual step.

* chore: update ignore files for TypeScript declarations

Add dist-types/ to .gitignore (build artefact). Whitelist index.d.ts
in .npmignore so type declarations ship with the package.

* ci: add typecheck workflow to validate TypeScript declarations

Runs npm run check:types on push and PR to main, matching the existing
lint/test/build workflow pattern.
2026-05-21 22:33:48 +02:00
Stasia Michalska c1b87080f1 Rename to @rebble/clay and pebble-dev/clay 2025-12-21 18:48:49 +01:00
Stasia Michalska 078186cd25 Add flint support 2025-12-13 00:53:33 +01:00
Stasia Michalska 4dad63ea90 Update to newer gulp version 2025-12-12 16:46:12 +01:00
Stasia Michalska 6335169e9a Remove node-sass requirement that crashes the build 2025-11-15 21:07:43 +01:00
Keegan Lillo ae31f9737f #120 - Fixed Error: Cannot find module 'message_keys' in dev script 2016-06-23 23:39:06 -07:00
Keegan 3cffa3a275 Send messageKeys down to appMessage in the new format 2016-06-15 21:50:36 -07:00
Keegan 118df1d952 Make Clay a Pebble package 2016-06-14 17:02:01 -07:00
Keegan b1a6f184ba Stop exposing config as a reference. resolves #35 2016-03-11 02:25:59 +11:00
Keegan 34d83de59e Add deamdify transform to 'clay' task in gulpfile 2016-03-09 11:52:27 +11:00
Keegan fa72cfb3a3 fix autoprefixer not working in dev mode 2016-02-29 15:46:15 +11:00
Keegan 24bfc54991 Documentation! + some little fixes to add consistency between components 2016-02-16 01:03:21 -08:00
Keegan b0ac596543 Uglify final output 2016-02-15 11:39:57 -08:00
Keegan f00b288a82 fix watch for dev mode in gulpfile 2016-02-14 02:30:31 -08:00
Keegan 5ad2834cc8 add sunlight colors to color picker and tests 2016-02-12 16:38:06 -08:00
Keegan 41334698bd make Clay work with phone apps 2016-02-09 17:21:16 -08:00
Keegan 95bcf3e019 move bourbon to node_modules 2016-02-09 17:20:44 -08:00
Keegan cdb855edaa add eslint and clean up code 2016-01-27 19:12:12 -08:00
Keegan a3024d49bb add watcher for dev folder 2016-01-19 11:39:10 -08:00
Keegan 04273ed8d5 styling for input, toggle, color, select and button. 2016-01-18 15:47:36 -08:00
Keegan 08bff3ac4b threw out slate, mustache and zepto. replaced with minified.js 2016-01-08 18:54:57 -08:00
Keegan 58a1a3f498 basic dev setup done 2016-01-06 17:28:34 -08:00
Keegan d47db97bb6 WIP 2015-11-12 09:42:18 -08:00
Keegan 0aef0caf79 Touched everything by mistake 2015-10-21 19:40:03 -07:00
Keegan 1d0d179429 browserify things 2015-10-12 11:57:01 -07:00
Keegan 53e49339b5 refactor and add the ability to inject custom code 2015-10-12 01:49:56 -07:00
Keegan 227bb49786 Basic build process and transforming json into html 2015-10-11 00:15:18 -07:00