updates/Makefile

62 lines
1.2 KiB
Makefile
Raw Normal View History

2024-05-23 21:53:45 +00:00
SOURCE_FILES := index.ts
DIST_FILES := dist/index.js
2022-10-26 15:39:08 +00:00
2021-08-23 07:44:25 +00:00
node_modules: package-lock.json
npm install --no-save
2020-10-05 21:10:16 +00:00
@touch node_modules
2022-08-24 23:13:46 +00:00
.PHONY: deps
2020-10-05 21:10:16 +00:00
deps: node_modules
2022-08-24 23:13:46 +00:00
.PHONY: lint
2020-10-05 21:10:16 +00:00
lint: node_modules
2024-05-23 21:53:45 +00:00
npx eslint --ext js,jsx,ts,tsx --color .
npx tsc
2020-08-18 21:06:38 +00:00
2023-08-28 23:33:58 +00:00
.PHONY: lint-fix
lint-fix: node_modules
2024-05-23 21:53:45 +00:00
npx eslint --ext js,jsx,ts,tsx --color . --fix
npx tsc
2023-08-28 23:33:58 +00:00
2022-08-24 23:13:46 +00:00
.PHONY: test
2023-08-26 10:24:24 +00:00
test: node_modules build
2022-10-17 21:36:44 +00:00
npx vitest
2020-08-18 21:06:38 +00:00
.PHONY: test-update
2023-08-26 10:24:24 +00:00
test-update: node_modules build
npx vitest -u
2022-08-24 23:13:46 +00:00
.PHONY: build
2024-05-23 21:53:45 +00:00
build: node_modules $(DIST_FILES)
2022-10-26 15:39:08 +00:00
2024-05-23 21:53:45 +00:00
$(DIST_FILES): $(SOURCE_FILES) package-lock.json vite.config.ts
npx vite build
chmod +x $(DIST_FILES)
2020-03-09 22:57:04 +00:00
2022-08-24 23:13:46 +00:00
.PHONY: publish
2020-10-05 21:10:16 +00:00
publish: node_modules
2017-12-03 11:15:02 +00:00
git push -u --tags origin master
npm publish
2022-08-24 23:13:46 +00:00
.PHONY: update
2024-05-23 21:53:45 +00:00
update: node_modules
npx updates -cu
rm -rf node_modules package-lock.json
2021-08-23 07:44:25 +00:00
npm install
2020-12-22 20:29:00 +00:00
@touch node_modules
2019-05-06 21:33:15 +00:00
2024-05-23 21:53:45 +00:00
.PHONY: path
patch: node_modules lint test build
npx versions patch package.json package-lock.json
2020-08-13 18:37:05 +00:00
@$(MAKE) --no-print-directory publish
2017-12-03 11:15:02 +00:00
2022-08-24 23:13:46 +00:00
.PHONY: minor
2024-05-23 21:53:45 +00:00
minor: node_modules lint test build
npx versions minor package.json package-lock.json
2020-08-13 18:37:05 +00:00
@$(MAKE) --no-print-directory publish
2017-12-03 11:15:02 +00:00
2022-08-24 23:13:46 +00:00
.PHONY: major
2024-05-23 21:53:45 +00:00
major: node_modules lint test build
npx versions major package.json package-lock.json
2020-08-13 18:37:05 +00:00
@$(MAKE) --no-print-directory publish