JS ?= node

.PHONY: test
test:
	# Install TypeScript and JavaScript dependencies locally
	npm install
	$(MAKE) lint
	# Compile TypeScript (handwritten + generated by atdts) to JavaScript
	npm run tsc
	# Run the resulting code (compiled from TypeScript)
	$(JS) manual_sample.js
	$(JS) test_atdts.js

# Check for warnings from tslint and eslint, especially in the generated code
.PHONY: lint
lint:
	npm run lint

.PHONY: clean
clean:
	git clean -dfX
