-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79e3428
commit 0f27752
Showing
5 changed files
with
1,691 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
node_modules | ||
|
||
.sentinel | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This Makefile has been written according to guidelines at | ||
# https://tech.davis-hansson.com/p/make/ | ||
|
||
# Use ">" instead of "\t" for blocks to avoid surprising whitespace issues | ||
ifeq ($(origin .RECIPEPREFIX), undefined) | ||
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later. If you've installed an up-to-date Make with homebrew, you maye need to invoke 'gmake' instead of 'make'.) | ||
endif | ||
.RECIPEPREFIX = > | ||
|
||
# Make sure we use actual bash instead of zsh or sh | ||
SHELL := bash | ||
|
||
# Enfore bash "strict mode" | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | ||
.SHELLFLAGS := -euo pipefail -c | ||
|
||
# Use one shell session per rule instead of one shell session per line | ||
.ONESHELL: | ||
|
||
# Delete the target of a Make rule if the rule fails | ||
.DELETE_ON_ERROR: | ||
|
||
# Warn on undefined variables | ||
MAKEFLAGS += --warn-undefined-variables | ||
|
||
# Disabling all the magical-but-unreadable bits of Make | ||
MAKEFLAGS += --no-builtin-rules | ||
|
||
# Wrap npx so it only uses local dependencies | ||
NPX := npx --no-install | ||
|
||
SRC := $(shell find src -type f) | ||
|
||
# The first entry in a make file is the one that gets called by `make` without | ||
# arguments | ||
default: dist/index.js | ||
.PHONY: default | ||
|
||
clean: | ||
> rm -rf .sentinel build dist | ||
.PHONY: clean | ||
|
||
.sentinel/lint/es: $(SRC) | ||
> npm run lint:es | ||
> @mkdir -p $(@D) | ||
> @touch $@ | ||
|
||
.sentinel/lint/types: $(SRC) | ||
> npm run lint:types | ||
> @mkdir -p $(@D) | ||
> @touch $@ | ||
|
||
.sentinel/build: $(SRC) | ||
> $(NPX) babel --extensions '.js,.ts' --source-maps -d build src | ||
> @mkdir -p $(@D) | ||
> @touch $@ | ||
|
||
dist/index.js: .sentinel/build | ||
> $(NPX) ncc build build/index.js --source-map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,4 @@ inputs: | |
required: false | ||
runs: | ||
using: 'node12' | ||
main: 'index.js' | ||
main: 'dist/index.js' |
Oops, something went wrong.