-
Notifications
You must be signed in to change notification settings - Fork 2
/
skewer-reload-stylesheets-test.el
38 lines (25 loc) · 1.11 KB
/
skewer-reload-stylesheets-test.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
;;; skewer-reload-stylesheets-test.el --- Test package interactively
;;; Author: Nate Eagleson
;;; Version: 0.0.1
;;; Commentary:
;; This is just a quick hack to make it easier to play with the package
;; interactively in a clean Emacs instance, without having to jump through hoops.
;;
;; Ideally I'd have an actual test suite, but this is a place to start.
;;; Code:
(require 'scss-mode)
(defvar skewer-reload-stylesheets-test-file load-file-name)
(defun skewer-reload-stylesheets-test-setup ()
"Set up as much of the skewer infrastructure as we can."
(setq debug-on-error t)
(setq httpd-port 9000)
(add-hook 'css-mode-hook
'skewer-reload-stylesheets-start-editing)
(let* ((project-dir (file-name-directory skewer-reload-stylesheets-test-file))
(test-html-file (concat project-dir "/test/css-reloading.html"))
(test-html-url (concat "file:///" test-html-file))
(test-css-file (concat project-dir "/test/overrides.css")))
(find-file test-css-file)
(browse-url test-html-url)))
(provide 'skewer-reload-stylesheets-test)
;;; skewer-reload-stylesheets-test.el ends here