Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
hlissner committed Dec 9, 2017
1 parent 8bc6b7d commit 894a86d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -38,11 +38,13 @@ developers!
This plugin introduces a `pug-compile` function. You can call it
directly (e.g. `M-x pug-compile`) or have it done automatically for .pug files:

```(defun pug-compile-saved-file()
```emacs-lisp
(defun pug-compile-saved-file()
(when (and (stringp buffer-file-name)
(string-match "\\.pug\\'" buffer-file-name))
(pug-compile)))
(add-hook 'after-save-hook 'pug-compile-saved-file)```
(add-hook 'after-save-hook 'pug-compile-saved-file)
```

It requires [pug-cli](https://www.npmjs.com/package/pug-cli).

Expand Down

0 comments on commit 894a86d

Please sign in to comment.