mirror of
https://github.com/mattermost/mattermost.git
synced 2026-04-15 05:57:37 -04:00
* Port scripts/update-versions to a shell script * Update the scripts to change the version to use jq * Add the shared package * Update webapp/scripts/CLAUDE.OPTIONAL.md * Update webapp/scripts/CLAUDE.OPTIONAL.md
1.2 KiB
1.2 KiB
CLAUDE: webapp/scripts/
Purpose
- Node-based helpers for building, running, and maintaining the webapp (e.g., dev server orchestration, build pipelines, localization tooling).
- Invoked via
npm/maketargets—direct execution should be rare.
Key Scripts
dev-server.mjs– webpack-dev-server bootstrap; shares config withmake dev.run.mjs,build.mjs,disthelpers – orchestrate multi-workspace builds and env wiring.gen_lang_imports.mjs– regenerates locale import lists.update-versions.sh- updates version of published platform packages.
Guidelines
- Scripts should be idempotent and safe to run on CI and macOS/Linux dev machines.
- Prefer ES modules + top-level
awaitalready used in existing scripts. - Keep configuration (ports, paths) sourced from
config.mkor env vars instead of hard-coding. - Log actionable errors; exit with non-zero codes so CI fails fast.
- When script behavior changes, update associated
Makefiletargets andwebapp/CLAUDE.mdcommand docs.
References
config.mk, rootMakefile, and workspacepackage.jsonscripts to understand entry points.webapp/STYLE_GUIDE.md → Automated style checkingfor how scripts integrate with lint/test tooling.