Skip to content

Commit

Permalink
devenv: Add make target to "install" vscode extension
Browse files Browse the repository at this point in the history
Taking advantage of workspace local extensions, this adds a make target that will symlink the
`code/` directory to `.vscode/extensions/esbonio` allowing it to be installed.
It would be nice if there was a cli `code` command that would do the final step though....
  • Loading branch information
alcarney committed Jul 7, 2024
1 parent 26ffe01 commit f4eb379
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.env
.ipynb_checkpoints
.tox
.vscode/extensions/esbonio
.vscode-test

*.pyc
Expand Down
6 changes: 5 additions & 1 deletion code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include ../.devcontainer/tools.mk

ESBONIO ?= --pre esbonio

.PHONY: dist dev-deps release-deps release
.PHONY: dist dev-deps release-deps release install

watch: dev-deps $(NPM)
-test -d dist && rm -r dist
Expand All @@ -12,6 +12,10 @@ compile: dev-deps $(NPM)
-test -d dist && rm -r dist
$(NPM) run compile

install: compile
-test -d ../.vscode/extensions || mkdir -p ../.vscode/extensions
test -L ../.vscode/extensions/esbonio || ln -s $(PWD) ../.vscode/extensions/esbonio

dist: release-deps $(NPM)
-test -d dist && rm -r dist
$(NPM) run package
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"package": "vsce package --pre-release --baseImagesUrl https://github.com/swyddfa/esbonio/raw/release/code/",
"vscode:prepublish": "npm run compile"
},
"main": "dist/node/extension",
"main": "dist/node/extension.js",
"extensionDependencies": [
"ms-python.python",
"chrisjsewell.myst-tml-syntax"
Expand Down

0 comments on commit f4eb379

Please sign in to comment.