Maxim Prokhorov
95d1f99261
webui(build): fix import
2025-06-01 06:08:18 +03:00
Maxim Prokhorov
b41a20aa86
webui(build): support type=...;base64
...
in case there are any unquotable or binary sources
SCRIPT is an odd one per the spec, ignore type=...
as it is describing how minification & bundling is done
2025-04-15 20:43:01 +03:00
Maxim Prokhorov
367dca8b05
webui(test): import when paths become available
2025-04-14 23:44:50 +03:00
Maxim Prokhorov
ed60ee02fc
webui(build): expect string or string[] as preset arg
2025-04-14 23:26:17 +03:00
Maxim Prokhorov
cadde6dac6
webui(build): shared build & test paths
2025-04-14 23:18:25 +03:00
Maxim Prokhorov
68631fbbcd
webui(build): gulp html modifications should not happen in parallel
...
Promise.all() does not handle array members in sequence
2025-04-14 04:47:00 +03:00
Maxim Prokhorov
93d7d3986b
webui(build): vitest.config.js & shared location imports
2025-04-14 04:08:48 +03:00
Maxim Prokhorov
e7acf9fb6a
webui(build): rollup circular dependency
...
avoid sharing utility funcs through the main module
2025-04-14 04:08:48 +03:00
Maxim Prokhorov
9dc57878c1
webui(build): build params & vite dev support
...
- experimental vite dev server support
- gulp webui_build & webui_PRESET -> build
- gulp task params for build and dev server
- bundle sources using rollup in both gulp and vite
- PRESET lib to manage available modules and their constants
replacing 'define' method of .js code treeshaking
2025-04-14 01:14:13 +03:00
Maxim Prokhorov
a5a65c6a61
webui(build): types and fixup pipeline comment section
2025-04-05 01:03:59 +03:00
Maxim Prokhorov
831e935c7c
webui(build): wrap gulp.dest to log outputs
...
using original function naming, too
2025-04-05 00:24:38 +03:00
Maxim Prokhorov
f08f86608f
webui(build): adjust mtime based on inline-source
...
consistent datetime value when rebuilding from the same source
2025-04-03 18:48:01 +03:00
Maxim Prokhorov
be46c3fd70
webui(build): rollback to gzip & fix content-encoding
...
br only works w/ https://... endpoint and abruptly fails on most (if not all) clients
fix gz -> gzip previously missed in the response header
2025-04-02 19:09:22 +03:00
Maxim Prokhorov
a18913358c
webui(build): last-modified as .html build value, not .cpp
...
also convert strings at comptime, ensure strlen never gets called
2025-04-01 03:22:28 +03:00
Maxim Prokhorov
00c3df0954
webui(build): group test & build
2025-04-01 03:00:12 +03:00
Maxim Prokhorov
e890b0be76
webui(build): allow both gzip and br in the builder
...
- switch to 'br' by default. convert relevant file references in the web.cpp
.h -> .ipp and drop compression type from the filename
'webui_content_encoding' string to help out the server
- build options now include both minification and compression type
- make sure output file syntax is valid when opening it standalone
2025-04-01 03:00:08 +03:00
Maxim Prokhorov
078df05d7f
webui(build): lint & test imported on-demand
...
minor speed-up when just building .html & .mjs
2025-03-31 21:01:27 +03:00
Maxim Prokhorov
e4b5dcb232
webui(build): consistent zlib header mtime and os-code
2025-03-31 19:55:14 +03:00
Maxim Prokhorov
181c12d719
webui(build): include vitest runner
2025-03-31 19:55:14 +03:00
Maxim Prokhorov
151b2bcebc
webui(build): clarify gulp commands and tasks tree
2025-03-31 19:55:14 +03:00
Maxim Prokhorov
8c52153c7d
webui(build): generic err cleanup
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
1ab136cbdf
webui(build): error tracing for the file stream pipeline
...
usually, errors of the build script itself of b/c of file access
lint is called separately, only build errors would be shown
esbuild opts out of too much syntax checks, usually breaking js
execution instead and / or when referenced modules cannot be loaded
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
f98565e528
webui(build): missing builder readme.md
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
a6fa8c8d8b
webui(build): lint javascript & html before gulp build
...
reproduce cli calls in js api, do not wait for ci to run these
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
6acb8c5a16
webui(build): through2 -> node:stream Transform
...
drop local dependency on through2 in favour of node:stream
but, still ensure that things work for gulp-style File streams
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
108ee655fe
webui(build): pipeline instead of pipe
...
ref.
https://github.com/gulpjs/gulp/issues/2812
https://nodejs.org/en/learn/modules/how-to-use-streams#how-to-operate-with-streams
https://nodejs.org/en/learn/modules/how-to-use-streams#pipeline
while the gulp issue refers to this as a workaround, this is actually the
proper way to handle streams, merging streams and applying transformations
webserver code still spawns the pipe(line) unconditionally, though
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
abbf7218f4
webui(build): rename files inline
...
note node-22 currently harmless deprecation warning coming from vinyl-fs clone()
2025-03-05 19:09:03 +03:00
Maxim Prokhorov
c125bc24a0
webui: esm output for script
2024-07-13 11:06:45 +03:00
Maxim Prokhorov
350da6e94c
build: consistent package versions used in webui script
...
limit possible stream impls to readable-stream v3 & streamx
2024-07-12 16:52:30 +03:00
Maxim Prokhorov
e4d6d10f1a
webui: integrate html-validate into the pipeline
2024-07-08 10:32:01 +03:00
Maxim Prokhorov
13ca2149db
webui: real index override w/ sourcemaps
...
generate debugable .html output per build flavour
drop device-fs-friendly blobs from the repo, expect local rebuild
2024-07-08 10:16:41 +03:00
Maxim Prokhorov
a4b52c20f4
webui: build typos
2024-06-30 17:28:01 +03:00
Maxim Prokhorov
001f9dfbf3
webui: gulp-replace dependency clean-up
...
throw out broken package.json dependencies related to @types/...
plus, current pipe order needs neither stream or regexp implementations
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
2dadf01839
webui: gulpfile in strict mode
...
amends f58d086dd6
attempt to distinguish build and ui scripts
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
ab9c76e437
webui: fix "all" accidentally including local code
2024-06-24 23:08:53 +03:00
Maxim Prokhorov
d6c758f099
webui: local server publishes modules as-is
...
note that import.meta.resolve for iro returns non-es file (for some reason)
hardcode minified dist es module from node_modules, whuch should be used instead
fix server routing to only rebuild html when root is accessed
2024-06-24 22:43:19 +03:00
Maxim Prokhorov
f58d086dd6
webui: gulp tasks as module exports
...
per https://gulpjs.com/docs/en/getting-started/creating-tasks/
gulp --tasks[-*] now actually works
update jsdoc comments and eslint rules
2024-06-24 22:42:00 +03:00