Files
Maxim Prokhorov d49b33def3 webui(settings): default to step="any" for generic number inputs
per. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/step implicit default is step="1"
> If not explicitly included, step defaults to 1 for number and range, and 1 unit type (minute, week, month, day) for the date/time input types.
> The value must be a positive number - integer or float — or the special value any, which means no stepping is implied and any value is allowed
> (barring other constraints, such as min and max)
>
> Only values which are a whole number of steps from the step base are valid.

.checkValidity()/.reportValidity() enforce the rule, making these values
impossible to set (besides manually setting the kv through console)

also clean-up any defaults & suspicious use in specific modules

resolve #2651
2025-08-29 18:06:20 +03:00
..
2025-06-03 21:25:44 +03:00
2025-04-14 01:14:13 +03:00
2025-04-14 01:14:13 +03:00
2025-04-14 05:18:25 +03:00

Builder script is using Gulp

Additional tools used

All commands must be called from code/

$ pwd
/home/dev/espurna/code

When gulp command is not available globally

$ ./node_modules/.bin/gulp

Files

  • code/espurna/static/ - .html.ipp, used in the firmware code
  • code/gulpfile.mjs - builder script entrypoint
  • code/vite.config.mjs - (experimental) vite dev server configuration
  • code/html/index.html - main entrypoint, index.html template
  • code/html/build - intermediate build results
  • code/html/preset - build configurations
  • code/html/spec - vitest 'spec' files
  • code/html/src - source .mjs, .html, etc.
  • code/node_modules - build dependencies
  • code/package{,-lock}.json - build dependencies metadata

Installation

(recommended) Install exact dependencies listed in the package-lock.json, from the time the builder code was last updated

$ npm ci

(optional) Install dependencies listed in the package.json, possibly updating packages listed in the package-lock.json

$ npm install

Building

Run tests and build every .html.ipp (default task)

$ gulp

Build only (does not run tests)

$ gulp build

Build specific flavour (preset tasks)

$ gulp build --preset small

List all available tasks

$ gulp --tasks

Development

Launches development server on port 8080 with the resulting .html bundle. No minification or compression, using dev preset as base

$ gulp dev

Only the default task depends on the test and lint tasks, call them manually

$ gulp test
$ gulp eslint html-validate vitest
$ gulp eslint
$ gulp html-validate
$ gulp vitest

Gulp usually does not allow any task arguments, run these tools manually to select specific files or change command line arguments

$ npm exec --no -- eslint gulpfile.mjs html/src/*.mjs html/spec/*.mjs
$ npm exec --no -- html-validate html/src/*.html
$ npm exec --no -- vitest --environment jsdom --dir html/spec --run

Experimental support of Vite dev server is also included. Every preset is supported, but only --mode dev is expected to work locally

$ vite --mode dev