-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
8 changed files
with
30 additions
and
28 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,4 +1,4 @@ | ||
/.cache | ||
/.parcel-cache | ||
/dist | ||
/node_modules | ||
/package-lock.json |
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,26 +1,36 @@ | ||
# This Makefile is a wrapper around the scripts from `package.json`. | ||
# https://github.com/lgarron/Makefile-scripts | ||
.PHONY: build | ||
build: build-esm build-bundle-global build-types | ||
|
||
# Note: the first command becomes the default `make` target. | ||
NPM_COMMANDS = build build-types build-esm build-bundle-global build-site dev clean prepack | ||
.PHONY: setup | ||
setup: | ||
bun install --no-save | ||
|
||
.PHONY: $(NPM_COMMANDS) | ||
$(NPM_COMMANDS): | ||
npm run $@ | ||
.PHONY: build-esm | ||
build-esm: setup | ||
bun run script/build-esm.ts | ||
|
||
# We write the npm commands to the top of the file above to make shell autocompletion work in more places. | ||
DYNAMIC_NPM_COMMANDS = $(shell cat package.json | npx jq --raw-output ".scripts | keys_unsorted | join(\" \")") | ||
.PHONY: update-Makefile | ||
update-Makefile: | ||
sed -i "" "s/^NPM_COMMANDS = .*$$/NPM_COMMANDS = ${DYNAMIC_NPM_COMMANDS}/" Makefile | ||
.PHONY: build-bundle-global | ||
build-bundle-global: setup | ||
bun run script/build-bundle-global.ts | ||
|
||
# This is not in `scripts` in `package.json`, because that would cause a double-build. | ||
.PHONY: publish | ||
publish: | ||
npm publish | ||
.PHONY: build-types | ||
build-types: setup | ||
npx tsc -p tsconfig.json | ||
|
||
SFTP_PATH = "[email protected]:~/experiments.cubing.net/scramble-display/" | ||
URL = "https://experiments.cubing.net/scramble-display/" | ||
.PHONY: build-site | ||
build-site: setup | ||
bun run script/build-site.ts | ||
|
||
.PHONY: dev | ||
dev: setup | ||
bun run script/dev.ts | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf ./.cache ./dist | ||
|
||
.PHONY: prepublishOnly | ||
prepack: clean test | ||
|
||
.PHONY: deploy | ||
deploy: clean build-site | ||
|
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 |
---|---|---|
|
@@ -13,14 +13,7 @@ | |
}, | ||
"repository": "github:cubing/scramble-display", | ||
"scripts": { | ||
"build": "npm run build-types && npm run build-esm && npm run build-bundle-global", | ||
"build-types": "npx tsc -p tsconfig.json", | ||
"build-esm": "node script/build-esm.js", | ||
"build-bundle-global": "node script/build-bundle-global.js", | ||
"build-site": "node script/build-site.js", | ||
"dev": "node script/dev.js", | ||
"clean": "rm -rf ./.cache ./dist", | ||
"prepack": "npm run clean && npm run build" | ||
"prepublishOnly": "make prepublishOnly" | ||
}, | ||
"author": "Lucas Garron <[email protected]>", | ||
"license": "GPL-3.0-or-later", | ||
|
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.