Skip to content

Cross-platform Makefile #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
build: clean # builds for the current platform
node_modules/.bin/tsc -p .
${CURDIR}/node_modules/.bin/tsc -p .

clean: # removes all build artifacts
rm -rf dist

coverage: # measures test coverage
node_modules/.bin/nyc node_modules/.bin/mocha --require source-map-support/register test/*.test.ts
node_modules/.bin/nyc report --reporter=text-lcov | node_modules/.bin/coveralls
${CURDIR}/node_modules/.bin/nyc node_modules/.bin/mocha --require source-map-support/register test/*.test.ts
${CURDIR}/node_modules/.bin/nyc report --reporter=text-lcov | node_modules/.bin/coveralls

docs: # runs the documentation tests
# node_modules/.bin/text-run --offline --format dot

fix:
${CURDIR}/node_modules/.bin/eslint . --ext .ts --fix
prettier --write .
${CURDIR}/node_modules/.bin/prettier --write .

help: # prints all make targets
cat Makefile | grep '^[^ ]*:' | grep -v '.PHONY' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t

lint: # lints all files
node_modules/.bin/tsc --noEmit
${CURDIR}/node_modules/.bin/tsc --noEmit
${CURDIR}/node_modules/.bin/eslint --ext .ts .
node_modules/.bin/prettier -c .
${CURDIR}/node_modules/.bin/prettier -c .

setup: # sets up the installation on this machine
yarn install
Expand All @@ -30,7 +30,7 @@ test: lint unit docs # runs all tests
.PHONY: test

unit: # runs the tests
node_modules/.bin/mocha test/*.test.ts
${CURDIR}/node_modules/.bin/mocha test/*.test.ts

update: # updates the dependencies to their latest versions
yarn upgrade --latest
Expand Down