Skip to content

Commit 69fd462

Browse files
committed
Merge branch 'lunny/locale_file_json' of github.com:lunny/gitea into lunny/locale_file_json
2 parents 2ab39c9 + 71573ed commit 69fd462

32 files changed

+1792
-3290
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 1005 deletions
This file was deleted.

Makefile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/r
135135
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
136136
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)
137137

138-
RSPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
139-
RSPACK_CONFIGS := rspack.config.ts tailwind.config.ts
140-
RSPACK_DEST := public/assets/js/index.js public/assets/css/index.css
141-
RSPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
138+
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
139+
WEBPACK_CONFIGS := webpack.config.ts tailwind.config.ts
140+
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
141+
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
142142

143143
BINDATA_DEST_WILDCARD := modules/migration/bindata.* modules/public/bindata.* modules/options/bindata.* modules/templates/bindata.*
144144

@@ -162,7 +162,7 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(DIST)
162162
GO_DIRS := build cmd models modules routers services tests
163163
WEB_DIRS := web_src/js web_src/css
164164

165-
ESLINT_FILES := web_src/js tools *.ts *.cjs tests/e2e
165+
ESLINT_FILES := web_src/js tools *.ts tests/e2e
166166
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
167167
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) templates options/locale/locale_en-US.json .github $(filter-out CHANGELOG.md, $(wildcard *.go *.md *.yml *.yaml *.toml)) $(filter-out tools/misspellings.csv, $(wildcard tools/*))
168168
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.json
@@ -238,7 +238,7 @@ node-check:
238238

239239
.PHONY: clean-all
240240
clean-all: clean ## delete backend, frontend and integration files
241-
rm -rf $(RSPACK_DEST_ENTRIES) node_modules
241+
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
242242

243243
.PHONY: clean
244244
clean: ## delete backend and integration files
@@ -346,12 +346,12 @@ lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backen
346346

347347
.PHONY: lint-js
348348
lint-js: node_modules ## lint js files
349-
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES)
349+
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 --flag unstable_native_nodejs_ts_config $(ESLINT_FILES)
350350
$(NODE_VARS) pnpm exec vue-tsc
351351

352352
.PHONY: lint-js-fix
353353
lint-js-fix: node_modules ## lint js files and fix issues
354-
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES) --fix
354+
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 --flag unstable_native_nodejs_ts_config $(ESLINT_FILES) --fix
355355
$(NODE_VARS) pnpm exec vue-tsc
356356

357357
.PHONY: lint-css
@@ -428,8 +428,8 @@ watch: ## watch everything and continuously rebuild
428428

429429
.PHONY: watch-frontend
430430
watch-frontend: node-check node_modules ## watch frontend files and continuously rebuild
431-
@rm -rf $(RSPACK_DEST_ENTRIES)
432-
NODE_ENV=development $(NODE_VARS) pnpm exec rspack --watch
431+
@rm -rf $(WEBPACK_DEST_ENTRIES)
432+
NODE_ENV=development $(NODE_VARS) pnpm exec webpack --watch --progress --disable-interpret
433433

434434
.PHONY: watch-backend
435435
watch-backend: go-check ## watch backend files and continuously rebuild
@@ -747,7 +747,7 @@ install: $(wildcard *.go)
747747
build: frontend backend ## build everything
748748

749749
.PHONY: frontend
750-
frontend: $(RSPACK_DEST) ## build frontend files
750+
frontend: $(WEBPACK_DEST) ## build frontend files
751751

752752
.PHONY: backend
753753
backend: go-check generate-backend $(EXECUTABLE) ## build backend files
@@ -878,15 +878,15 @@ update-py: node-check | node_modules ## update py dependencies
878878
uv sync
879879
@touch .venv
880880

881-
.PHONY: rspack
882-
rspack: $(RSPACK_DEST) ## build rspack files
881+
.PHONY: webpack
882+
webpack: $(WEBPACK_DEST) ## build webpack files
883883

884-
$(RSPACK_DEST): $(RSPACK_SOURCES) $(RSPACK_CONFIGS) pnpm-lock.yaml
884+
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) pnpm-lock.yaml
885885
@$(MAKE) -s node-check node_modules
886-
@rm -rf $(RSPACK_DEST_ENTRIES)
887-
@echo "Running rspack..."
888-
@$(NODE_VARS) pnpm exec rspack
889-
@touch $(RSPACK_DEST)
886+
@rm -rf $(WEBPACK_DEST_ENTRIES)
887+
@echo "Running webpack..."
888+
@BROWSERSLIST_IGNORE_OLD_DATA=true $(NODE_VARS) pnpm exec webpack --disable-interpret
889+
@touch $(WEBPACK_DEST)
890890

891891
.PHONY: svg
892892
svg: node-check | node_modules ## build svg files

0 commit comments

Comments
 (0)