Skip to content

Commit 0438b2b

Browse files
author
Roland Peelen
committed
🎨 - Esy -> Opam + Make
1 parent b69194a commit 0438b2b

53 files changed

Lines changed: 84 additions & 3086 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ npm-debug.log
2020
*.cmt
2121
.vscode
2222
.vim
23+
_opam

Makefile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
project_name = graphql_ppx
2+
3+
DUNE = opam exec -- dune
4+
5+
.DEFAULT_GOAL := help
6+
7+
.PHONY: help
8+
help: ## Print this help message
9+
@echo "List of available make commands";
10+
@echo "";
11+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}';
12+
@echo "";
13+
14+
.PHONY: create-switch
15+
create-switch: ## Create opam switch
16+
opam switch create . 5.1.0 -y --deps-only
17+
18+
.PHONY: init
19+
init: create-switch install ## Configure everything to develop this repository in local
20+
21+
.PHONY: install
22+
install: ## Install development dependencies
23+
opam update
24+
opam install -y . --deps-only --with-test
25+
26+
.PHONY: test
27+
test: ## Run tests using yest
28+
$(DUNE) build
29+
./tests.sh
30+
31+
.PHONY: build
32+
build: ## Build the project
33+
$(DUNE) build
34+
35+
.PHONY: release_static
36+
release_static: ## Release the project
37+
$(DUNE) build --root . --only-packages '#{self.name}' --ignore-promoted-rules --no-config --profile release-static
38+
39+
.PHONY: build_verbose
40+
build_verbose: ## Build the project
41+
$(DUNE) build --verbose
42+
43+
.PHONY: clean
44+
clean: ## Clean build artifacts and other generated files
45+
$(DUNE) clean
46+
47+
.PHONY: format
48+
format: ## Format the codebase with ocamlformat
49+
$(DUNE) build @fmt --auto-promote
50+
51+
.PHONY: format-check
52+
format-check: ## Checks if format is correct
53+
$(DUNE) build @fmt
54+
55+
.PHONY: watch
56+
watch: ## Watch for the filesystem and rebuild on every change
57+
$(DUNE) build --promote-install-files --root . --watch
58+
59+

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
(lang dune 3.8)
1+
(lang dune 3.12)
22

33
(name graphql_ppx)

dune-workspace

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 1.1)
1+
(lang dune 3.12)
22

33
(env
44
(release-static

esy.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

esy.lock/.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

esy.lock/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)