mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Minimal backend typescript support (#3207)
* minimal ts support Co-authored-by: Matt Godbolt <matt@godbolt.org>
This commit is contained in:
15
Makefile
15
Makefile
@@ -43,7 +43,7 @@ $(NODE_MODULES): package.json | node-installed
|
||||
WEBPACK:=./node_modules/webpack-cli/bin/cli.js
|
||||
$(WEBPACK): $(NODE_MODULES)
|
||||
|
||||
lint: $(NODE_MODULES) ## Checks if the source currently matches code conventions
|
||||
lint: $(NODE_MODULES) ts-compile ## Checks if the source currently matches code conventions
|
||||
$(NPM) run lint
|
||||
|
||||
lint-fix: $(NODE_MODULES) ## Checks if everything matches code conventions & fixes those which are trivial to do so
|
||||
@@ -72,20 +72,25 @@ clean: ## Cleans up everything
|
||||
run: export NODE_ENV=production
|
||||
run: export WEBPACK_ARGS="--node-env=production"
|
||||
run: prereqs webpack ## Runs the site normally
|
||||
./node_modules/.bin/supervisor -w app.js,lib,etc/config,static/tsconfig.json -e 'js|ts|node|properties|yaml' --exec $(NODE) $(NODE_ARGS) -- -r esm ./app.js $(EXTRA_ARGS)
|
||||
./node_modules/.bin/supervisor -w app.js,lib,etc/config,static/tsconfig.json -e 'js|ts|node|properties|yaml' --exec $(NODE) $(NODE_ARGS) -- -r esm -r ts-node/register ./app.js $(EXTRA_ARGS)
|
||||
|
||||
dev: export NODE_ENV=development
|
||||
dev: prereqs ## Runs the site as a developer; including live reload support and installation of git hooks
|
||||
./node_modules/.bin/supervisor -w app.js,lib,etc/config,static/tsconfig.json -e 'js|ts|node|properties|yaml' -n exit --exec $(NODE) $(NODE_ARGS) -- -r esm ./app.js $(EXTRA_ARGS)
|
||||
./node_modules/.bin/supervisor -w app.js,lib,etc/config,static/tsconfig.json -e 'js|ts|node|properties|yaml' -n exit --exec $(NODE) $(NODE_ARGS) -- -r esm -r ts-node/register ./app.js $(EXTRA_ARGS)
|
||||
|
||||
debug: export NODE_ENV=development
|
||||
debug: prereqs ## Runs the site as a developer with full debugging; including live reload support and installation of git hooks
|
||||
./node_modules/.bin/supervisor -w app.js,lib,etc/config,static/tsconfig.json -e 'js|ts|node|properties|yaml' -n exit --inspect 9229 --exec $(NODE) $(NODE_ARGS) -- -r esm ./app.js --debug $(EXTRA_ARGS)
|
||||
./node_modules/.bin/supervisor -w app.js,lib,etc/config,static/tsconfig.json -e 'js|ts|node|properties|yaml' -n exit --inspect 9229 --exec $(NODE) $(NODE_ARGS) -- -r esm -r ts-node/register ./app.js --debug $(EXTRA_ARGS)
|
||||
|
||||
.PHONY: ts-compile
|
||||
# one day we'll put `--strict` in this
|
||||
ts-compile: prereqs
|
||||
./node_modules/.bin/tsc
|
||||
|
||||
HASH := $(shell git rev-parse HEAD)
|
||||
dist: export NODE_ENV=production
|
||||
dist: export WEBPACK_ARGS="--node-env=production"
|
||||
dist: prereqs webpack ## Creates a distribution
|
||||
dist: prereqs webpack ts-compile ## Creates a distribution
|
||||
echo $(HASH) > out/dist/git_hash
|
||||
|
||||
RELEASE_FILE_NAME=$(GITHUB_RUN_NUMBER)
|
||||
|
||||
Reference in New Issue
Block a user