Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Dec 30, 2024
1 parent 882649b commit 2c79570
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[Makefile]
indent_style = tab
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ npm-deps:
yarn install --immutable

.PHONY: deps
deps: ## Install development dependencies
deps:
$(MAKE) npm-deps
opam install --deps-only --with-test --with-doc --with-dev-setup --yes .

Expand All @@ -21,7 +21,7 @@ create_switch:
switch: create_switch deps ## Create an opam switch and install development dependencies

.PHONY: build
build: clean ## Build the project
build: ## https://github.com/ewanharris/vscode-versions
dune build src/vscode_ocaml_platform.bc.js --profile=release
yarn workspace astexplorer build
yarn esbuild _build/default/src/vscode_ocaml_platform.bc.js \
Expand All @@ -31,38 +31,38 @@ build: clean ## Build the project
--outdir=dist \
--packages=bundle \
--platform=node \
--target=es2022 \
--target=node22 \
--analyze

.PHONY: test
test: ## Run the unit tests
test:
dune build @runtest
yarn test

.PHONY: clean
clean: ## Clean build artifacts and other generated files
clean:
dune clean
$(RM) -r astexplorer/dist dist

.PHONY: doc
doc: ## Generate odoc documentation
doc:
dune build @doc

.PHONY: fmt
fmt: ## Format the codebase with ocamlformat
fmt:
dune build --auto-promote @fmt
yarn biome format --write

.PHONY: watch
watch: ## Watch for the filesystem and rebuild on every change
watch:
dune build @all -w --terminal-persistence=clear-on-rebuild

.PHONY: pkg
pkg: build # Builds and packages the extension for installment
pkg: clean build
yarn package

.PHONY: install
install: pkg # Builds, packages, and installs the extension to your VS Code
install: pkg
code --force --install-extension ocaml-platform.vsix

.PHONY:
Expand Down

0 comments on commit 2c79570

Please sign in to comment.