feat(frontend): configure vendor build scripts and fallback templates

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-10-04 23:04:45 +03:00
co-authored by Junie
parent 73f68e9a2f
commit 1cc070b7c0
7 changed files with 305 additions and 28 deletions
+16 -16
View File
@@ -1,24 +1,24 @@
#!/usr/bin/bash
#!/usr/bin/env bash
set -e
# Необходимо предварительно установить NPM и esbuild:
# Переходим в директорию скрипта
cd "$(dirname "$0")"
# Необходимо предварительно установить Node.js и npm:
# Для Ubuntu/Debian:
# sudo apt install npm
# npm install -g esbuild
# sudo apt install nodejs npm
# Для MacOS (через Homebrew):
# brew install npm
# npm install -g esbuild
# brew install node
# Для Windows:
# Скачайте и установите Node.js с официального сайта: https://nodejs.org/
# Затем установите esbuild глобально:
# npm install -g esbuild
# Устанавливаем CodeMirror и необходимые пакеты
npm install \ [±main ●●]
@codemirror/lang-html \
@codemirror/theme-one-dark \
@codemirror/commands \
@codemirror/language
# Устанавливаем зависимости
npm install
# Собираем js в каталог ./public/static/codemirror/editor.js с помощью esbuild
npx esbuild src/editor.js --bundle --format=esm --outfile=../public/static/codemirror/editor.js
# Собираем всё (CodeMirror и копирование вендорных библиотек в public/static/vendor/)
npm run build
# Подчищаем за собой node_modules
echo "Очистка node_modules..."
rm -rf node_modules