Changeset View
Changeset View
Standalone View
Standalone View
Makefile.local
TEST_DIRS := ./swh/web/tests | TEST_DIRS := ./swh/web/tests | ||||
TESTFLAGS = --hypothesis-profile=swh-web-fast | TESTFLAGS = --hypothesis-profile=swh-web-fast | ||||
TESTFULL_FLAGS = --hypothesis-profile=swh-web | TESTFULL_FLAGS = --hypothesis-profile=swh-web | ||||
YARN ?= yarn | YARN ?= yarn | ||||
SETTINGS_TEST ?= swh.web.settings.tests | SETTINGS_TEST ?= swh.web.settings.tests | ||||
SETTINGS_DEV ?= swh.web.settings.development | SETTINGS_DEV ?= swh.web.settings.development | ||||
SETTINGS_PROD = swh.web.settings.production | SETTINGS_PROD = swh.web.settings.production | ||||
SWH_SEARCH_DIR := $(shell python -c "import os;from swh import search; print(os.path.dirname(search.__file__))") | |||||
yarn-install: package.json | yarn-install: package.json | ||||
$(YARN) install --frozen-lockfile | $(YARN) install --frozen-lockfile | ||||
.PHONY: build-webpack-dev | .PHONY: build-webpack-dev | ||||
build-webpack-dev: yarn-install | build-webpack-dev: | ||||
$(YARN) build-dev | $(YARN) build-dev | ||||
.PHONY: build-webpack-test | .PHONY: build-webpack-test | ||||
build-webpack-test: yarn-install | build-webpack-test: yarn-install | ||||
$(YARN) build-test | $(YARN) build-test | ||||
.PHONY: build-webpack-dev-no-verbose | .PHONY: build-webpack-dev-no-verbose | ||||
build-webpack-dev-no-verbose: yarn-install | build-webpack-dev-no-verbose: yarn-install | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | |||||
# Override default rule to make sure DJANGO env var is properly set. It | # Override default rule to make sure DJANGO env var is properly set. It | ||||
# *should* work without any override thanks to the mypy django-stubs plugin, | # *should* work without any override thanks to the mypy django-stubs plugin, | ||||
# but it currently doesn't; see | # but it currently doesn't; see | ||||
# https://github.com/typeddjango/django-stubs/issues/166 | # https://github.com/typeddjango/django-stubs/issues/166 | ||||
check-mypy: | check-mypy: | ||||
DJANGO_SETTINGS_MODULE=$(SETTINGS_DEV) $(MYPY) $(MYPYFLAGS) swh | DJANGO_SETTINGS_MODULE=$(SETTINGS_DEV) $(MYPY) $(MYPYFLAGS) swh | ||||
build-ts-wasm: | |||||
yarn run tree-sitter build-wasm $(SWH_SEARCH_DIR)/query_language | |||||
cp $(SWH_SEARCH_DIR)/query_language/tokens.js assets/tokens.js |