guard-gulp 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/LICENSE +22 -0
- data/README.md +39 -0
- data/lib/guard/gulp.rb +13 -0
- data/lib/guard/gulp/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b9cb5e7c4a2044d6b7ee1fb32ff5e9e68d6a266
|
4
|
+
data.tar.gz: b8a6240568611e1b9db0034e451660a686095b23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 687f500c31041743984c2a8e3b038b6b41315762a2856f50fd740711996cc80dc5f6017041d7c5974dc989b37d6fc77c8de50dcbca639bd6c7f562d758153d0f
|
7
|
+
data.tar.gz: 09dad7e134b8a1ff2983cf3ce517388cd467e438de2e5e903e51a3336afaa43141c8e8292c8d08e594565829de8b328349f799dfc016b9afa9bf98e6fb69b23c
|
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT LICENSE
|
2
|
+
|
3
|
+
Copyright (c) 2014 Wegowise Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# guard-gulp
|
2
|
+
|
3
|
+
Guard::Gulp is a [Guard](http://guardgem.org/) plugin to automatically
|
4
|
+
start/stop/restart gulp.
|
5
|
+
|
6
|
+
### Getting Started
|
7
|
+
|
8
|
+
If you're using Bundler, you can add guard-gulp to your Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'guard-gulp'
|
12
|
+
```
|
13
|
+
|
14
|
+
Or manually install the guard-gulp gem:
|
15
|
+
|
16
|
+
```shell
|
17
|
+
gem install guard-gulp
|
18
|
+
```
|
19
|
+
|
20
|
+
Add the guard definition to your Guardfile by running this command:
|
21
|
+
|
22
|
+
```shell
|
23
|
+
guard init gulp
|
24
|
+
```
|
25
|
+
|
26
|
+
Don't forget to [install
|
27
|
+
Gulp](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#getting-started)!
|
28
|
+
|
29
|
+
### Guardfile
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
guard 'gulp' do
|
33
|
+
watch(%r{^gulpfile.js$})
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
### Contributing
|
38
|
+
|
39
|
+
Fork, branch, and pull-request.
|
data/lib/guard/gulp.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'guard'
|
2
2
|
require 'guard/guard'
|
3
|
+
require 'mkmf'
|
4
|
+
require 'timeout'
|
3
5
|
|
4
6
|
module Guard
|
5
7
|
class Gulp < Guard
|
@@ -8,10 +10,12 @@ module Guard
|
|
8
10
|
def initialize(watchers = [], options = {})
|
9
11
|
@options = options
|
10
12
|
@pid = nil
|
13
|
+
@gulp_installed = gulp_installed?
|
11
14
|
super
|
12
15
|
end
|
13
16
|
|
14
17
|
def start
|
18
|
+
return unless @gulp_installed
|
15
19
|
stop
|
16
20
|
UI.info 'Starting gulp...'
|
17
21
|
UI.info cmd
|
@@ -71,5 +75,14 @@ module Guard
|
|
71
75
|
def env
|
72
76
|
{}
|
73
77
|
end
|
78
|
+
|
79
|
+
def gulp_installed?
|
80
|
+
if find_executable 'gulp'
|
81
|
+
true
|
82
|
+
else
|
83
|
+
UI.error 'Please install gulp!'
|
84
|
+
false
|
85
|
+
end
|
86
|
+
end
|
74
87
|
end
|
75
88
|
end
|
data/lib/guard/gulp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-gulp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Fixler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -31,8 +31,11 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
+
- ".gitignore"
|
34
35
|
- ".ruby-version"
|
35
36
|
- Gemfile
|
37
|
+
- LICENSE
|
38
|
+
- README.md
|
36
39
|
- guard-gulp.gemspec
|
37
40
|
- lib/guard-gulp.rb
|
38
41
|
- lib/guard/gulp.rb
|