trivabble/Makefile

44 lines
862 B
Makefile
Raw Permalink Normal View History

# -*- Makefile -*-
2021-04-26 08:45:16 +02:00
PORT?=3000
2020-05-16 14:03:08 +02:00
2020-05-16 10:02:18 +02:00
ESLINT?=eslint
2020-12-28 10:53:05 +01:00
TIDY?=tidy
2020-05-16 10:02:18 +02:00
ifeq (, $(shell which $(firstword ${ESLINT})))
ESLINT?=npx eslint
endif
2020-05-16 14:03:08 +02:00
.PHONY: all help lang start-dev-server
2020-10-16 18:34:01 +02:00
all: lang emptydictlist
2020-05-16 14:03:08 +02:00
help:
@echo make extract-lang-dists: extract the distributions per language from Wikipedia
2020-05-17 09:03:05 +02:00
@echo make lang: build the translation files
@echo make eslint: use ESLint to check conformance against the coding style
@echo make start-dev-server: start a development server
2020-05-17 09:03:05 +02:00
public/l10n/js/fr.js: $(wildcard l10n/po/*/*.po)
cd l10n; make
extract-lang-dists:
cd lang-dists-extractor; make
2020-05-18 08:32:49 +02:00
2020-05-17 09:03:05 +02:00
lang: public/l10n/js/fr.js
2020-10-16 18:34:01 +02:00
emptydictlist: public/dict/list.js
public/dict/list.js:
mkdir -p public/dict/ && touch public/dict/list.js
2020-05-07 00:52:46 +02:00
eslint:
2020-05-16 10:02:18 +02:00
-${ESLINT} **/*.js
2020-05-07 00:52:46 +02:00
2020-12-28 10:53:05 +01:00
tidy:
-${TIDY} -xml -errors -q public/*.html
2020-05-17 09:03:05 +02:00
start-dev-server: lang
cd server && make start-dev-server