Skip to content

Commit

Permalink
build: specify dependencies in a declarative way
Browse files Browse the repository at this point in the history
  • Loading branch information
zed committed Aug 10, 2024
1 parent 854c486 commit d61e231
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions htmlz-mode.el
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
;;; htmlz-mode --- Simple real-time Emacs html preview
;;; htmlz-mode.el --- Simple real-time Emacs html preview -*- lexical-binding:t -*-

;; Copyright (C) 2020 Zeke Medley

;; Author: Zeke Medley <[email protected]>
;; Keywords: html
;; Version: 0.2
;; Version: 0.3
;; Package-Requires: ((websocket "1.14"))
;; URL: https://github.com/ZekeMedley/htmlz

;;; Commentary:
Expand All @@ -18,18 +19,9 @@
;;
;;; Code:

(defun require-package (package)
"Install given PACKAGE if it was not installed before."
(if (package-installed-p package)
t
(progn
(unless (assoc package package-archive-contents)
(package-refresh-contents))
(package-install package))))

(defun htmlz-init-dependencies ()
"Initialize htmlz dependencies."
(require-package 'websocket)
(require 'websocket)
(require 'package)
(require 'browse-url)
(require 'websocket))
Expand Down

0 comments on commit d61e231

Please sign in to comment.