Files
espurna/code/html
Maxim Prokhorov db84cdda5e webui(ws): try to contain wsSend to the queue callback
- 'log' payload nesting reduced, just one element (for now)
- move terminal and ws logger into ws helper classes
- 'manual' callback mode to simply allow for ws send window
  by using slightly more complicated loop w/ queue checks, though
2025-04-02 23:03:32 +03:00
..
2025-03-19 23:56:03 +03:00
2018-03-19 07:13:21 +01:00
2024-06-25 17:53:50 +03:00
2025-04-01 03:00:12 +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/html/build - intermediate build results
  • 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 webui

Build specific flavour (webui_... tasks)

$ gulp webui_small

List all available tasks

$ gulp --tasks

Development

Launches development server on port 8080 with the resulting .html bundle. No minification or compression, using webui_all 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