Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/r
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/))
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)

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

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

Expand Down Expand Up @@ -238,7 +238,7 @@ node-check:

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

.PHONY: clean
clean: ## delete backend and integration files
Expand Down Expand Up @@ -428,8 +428,8 @@ watch: ## watch everything and continuously rebuild

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

.PHONY: watch-backend
watch-backend: go-check ## watch backend files and continuously rebuild
Expand Down Expand Up @@ -747,7 +747,7 @@ install: $(wildcard *.go)
build: frontend backend ## build everything

.PHONY: frontend
frontend: $(WEBPACK_DEST) ## build frontend files
frontend: $(RSPACK_DEST) ## build frontend files

.PHONY: backend
backend: go-check generate-backend $(EXECUTABLE) ## build backend files
Expand Down Expand Up @@ -878,15 +878,15 @@ update-py: node-check | node_modules ## update py dependencies
uv sync
@touch .venv

.PHONY: webpack
webpack: $(WEBPACK_DEST) ## build webpack files
.PHONY: rspack
rspack: $(RSPACK_DEST) ## build rspack files

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

.PHONY: svg
svg: node-check | node_modules ## build svg files
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
"@primer/octicons": "19.18.0",
"@resvg/resvg-wasm": "2.6.2",
"@rspack/cli": "1.5.3",
"@rspack/core": "1.5.3",
"@silverwind/vue3-calendar-heatmap": "2.0.6",
"@techknowlogick/license-checker-webpack-plugin": "0.3.0",
"add-asset-webpack-plugin": "3.0.0",
"add-asset-webpack-plugin": "3.1.0",
"ansi_up": "6.0.6",
"asciinema-player": "3.10.0",
"chart.js": "4.5.0",
Expand All @@ -30,13 +32,11 @@
"dayjs": "1.11.18",
"dropzone": "6.0.0-beta.2",
"easymde": "2.20.0",
"esbuild-loader": "4.3.0",
"htmx.org": "2.0.7",
"idiomorph": "0.7.3",
"jquery": "3.7.1",
"katex": "0.16.22",
"mermaid": "11.11.0",
"mini-css-extract-plugin": "2.9.4",
"minimatch": "10.0.3",
"monaco-editor": "0.53.0",
"monaco-editor-webpack-plugin": "7.1.0",
Expand All @@ -61,8 +61,6 @@
"vue-bar-graph": "2.2.0",
"vue-chartjs": "5.3.2",
"vue-loader": "17.4.2",
"webpack": "5.101.3",
"webpack-cli": "6.0.1",
"wrap-ansi": "9.0.2"
},
"devDependencies": {
Expand Down
Loading