mirror of
https://github.com/go-gitea/gitea
synced 2025-08-04 16:48:37 +00:00
Reorganize frontend files and tooling (#10168)
- move "vendor" files to js/vendor and less/vendor - move swagger to js/standalone (meant for standalone pages) - move gitgraph to features and streamline its loading - add linting configs to webpack dependencies in make - set ignored files for eslint/stylelint directly in their configs Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
This commit is contained in:
5
Makefile
5
Makefile
@@ -56,7 +56,8 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
|
||||
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO) list -mod=vendor ./... | grep -v /vendor/)))
|
||||
|
||||
GO_SOURCES ?= $(shell find . -name "*.go" -type f)
|
||||
WEBPACK_SOURCES ?= $(shell find web_src/js web_src/css web_src/less -type f)
|
||||
WEBPACK_SOURCES ?= $(shell find web_src/js web_src/less -type f)
|
||||
WEBPACK_CONFIGS := webpack.config.js .eslintrc .stylelintrc
|
||||
|
||||
WEBPACK_DEST := public/js/index.js public/css/index.css
|
||||
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
|
||||
@@ -517,7 +518,7 @@ $(FOMANTIC_EVIDENCE): semantic.json $(FOMANTIC_SOURCES) | node_modules
|
||||
.PHONY: webpack
|
||||
webpack: node-check $(WEBPACK_DEST)
|
||||
|
||||
$(WEBPACK_DEST): $(WEBPACK_SOURCES) webpack.config.js | node_modules
|
||||
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) | node_modules
|
||||
npx eslint web_src/js webpack.config.js
|
||||
npx stylelint web_src/less
|
||||
npx webpack --hide-modules --display-entrypoints=false
|
||||
|
Reference in New Issue
Block a user