guard-mthaml 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/guard/mthaml/compiler/MtHaml.php +1 -1
- data/lib/guard/mthaml/version.rb +1 -1
- data/lib/guard/mthaml.rb +18 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfb7415b1ef25b25d9bca0c141ea2356874db293
|
4
|
+
data.tar.gz: 314b133502244389b1ad4a5b3248136a03a8387d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a742106cf67f41927f600076531d6609785639cd01f1b468e37e31f4545fe47fa6da050a2fad98d8ba81358cbcd50e813e89ceca5b983329bcb84c48b48bfcc
|
7
|
+
data.tar.gz: 0f7366833f2e9badc7f8504749b905d733c5f7a2d18720549405248d386674340e1a584f735def12b3315d7ec5b4f4c0c2ffdc4e55bae00de59d7b86d675c758
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Guard::MtHaml [](http://badge.fury.io/rb/guard-mthaml)
|
2
2
|
This is a Guard wrapper to compile Haml to PHP, Twig or static HTML.
|
3
3
|
|
4
|
-
|
4
|
+
## Installation
|
5
5
|
Add to your `Gemfile`:
|
6
6
|
```ruby
|
7
7
|
gem 'guard-mthaml'
|
@@ -35,6 +35,12 @@ Requires that `php` be executable via command line.
|
|
35
35
|
guard :mthaml, :input => "views/src", :output => "views"
|
36
36
|
```
|
37
37
|
|
38
|
+
## Filters
|
39
|
+
Currently, only support for Markdown and CoffeeScript is available. I will eventually support Sass (pull requests are welcome). _MtHaml doesn't have a way of disabling the runtime variables inside of filters when attempting to use interpolation (`#{$var}`); this is a known issue that needs to be addressed within MtHaml before it can be included into this plugin._
|
40
|
+
|
41
|
+
* [CoffeeScript](https://github.com/alxlit/coffeescript-php/)
|
42
|
+
* [Markdown](https://github.com/michelf/php-markdown)
|
43
|
+
|
38
44
|
## Authors
|
39
45
|
[Ezekiel Gabrielse](http://ezekielg.com)
|
40
46
|
|
data/lib/guard/mthaml/version.rb
CHANGED
data/lib/guard/mthaml.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "guard"
|
2
2
|
require "guard/plugin"
|
3
3
|
require "guard/watcher"
|
4
|
+
require "pathname"
|
4
5
|
|
5
6
|
module Guard
|
6
7
|
class MtHaml < Plugin
|
@@ -15,8 +16,8 @@ module Guard
|
|
15
16
|
:environment => "php",
|
16
17
|
:notifications => true,
|
17
18
|
:compress_output => false,
|
18
|
-
:
|
19
|
-
:
|
19
|
+
:static_files => false,
|
20
|
+
:run_at_start => true
|
20
21
|
}.merge(options)
|
21
22
|
|
22
23
|
super(options)
|
@@ -33,10 +34,16 @@ module Guard
|
|
33
34
|
run_all if options[:run_at_start]
|
34
35
|
end
|
35
36
|
|
37
|
+
###
|
38
|
+
# Stop running
|
39
|
+
###
|
36
40
|
def stop
|
37
41
|
true
|
38
42
|
end
|
39
43
|
|
44
|
+
###
|
45
|
+
# On Guard reload
|
46
|
+
###
|
40
47
|
def reload
|
41
48
|
run_all
|
42
49
|
end
|
@@ -73,6 +80,15 @@ module Guard
|
|
73
80
|
end
|
74
81
|
end
|
75
82
|
|
83
|
+
###
|
84
|
+
# Called when a watched file is removed
|
85
|
+
#
|
86
|
+
# @param {Array} paths
|
87
|
+
# Paths of changed files
|
88
|
+
####
|
89
|
+
def run_on_removals(paths)
|
90
|
+
end
|
91
|
+
|
76
92
|
private
|
77
93
|
|
78
94
|
###
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-mthaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezekiel Gabrielse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|