Skip to content

Commit

Permalink
Add command to cross install the package into ~/.emacs.d/elpa.
Browse files Browse the repository at this point in the history
  • Loading branch information
llemaitre19 committed Apr 2, 2024
1 parent 0e55831 commit 0a2a936
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions Eask
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,12 @@
(funcall-interactively #'treesit-install-language-grammar 'typescript))

(add-hook 'eask-before-test/ert-hook #'install-treesit-languages)

;; Define command to install the package in the local emacs config (~/.emacs.d/elpa)
(eask-defcommand install-in-emacs-local-config
(let ((package-dir (file-name-directory (locate-library "jtsx")))
(target-dir (expand-file-name "~/.emacs.d/elpa/")))
(copy-directory package-dir target-dir)
(message "Installed in %s." (concat target-dir
(file-name-nondirectory
(directory-file-name package-dir))))))
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ test_all:
@echo "Testing against all Emacs versions..."
(cd tests && ./run-tests.bash)

# copy:
# @echo "Copying in .emacs.d/elpa..."
# $(EASK) install

cross_install:
@echo "Cross installing in .emacs.d/elpa..."
$(EASK) install
$(EASK) run command install-in-emacs-local-config

clean:
$(EASK) clean all

0 comments on commit 0a2a936

Please sign in to comment.