jekyll-watch 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/.travis.yml +20 -0
- data/History.markdown +15 -0
- data/README.md +2 -0
- data/jekyll-watch.gemspec +3 -1
- data/lib/jekyll-watch.rb +2 -1
- data/lib/jekyll/commands/watch.rb +19 -52
- data/lib/jekyll/watcher.rb +83 -0
- data/script/bootstrap +8 -0
- data/script/cibuild +3 -0
- data/script/test +3 -0
- data/script/test-watcher +5 -0
- data/script/unbundle +8 -0
- data/spec/spec_helper.rb +71 -0
- data/spec/test-site/.gitignore +1 -0
- data/spec/test-site/_config.dev.toml +1 -0
- data/spec/test-site/_config.yml +15 -0
- data/spec/test-site/_includes/footer.html +55 -0
- data/spec/test-site/_includes/head.html +11 -0
- data/spec/test-site/_includes/header.html +27 -0
- data/spec/test-site/_layouts/default.html +20 -0
- data/spec/test-site/_layouts/page.html +14 -0
- data/spec/test-site/_layouts/post.html +15 -0
- data/spec/test-site/_posts/2014-08-08-welcome-to-jekyll.markdown +25 -0
- data/spec/test-site/_sass/_base.scss +201 -0
- data/spec/test-site/_sass/_layout.scss +236 -0
- data/spec/test-site/_sass/_syntax-highlighting.scss +67 -0
- data/spec/test-site/about.md +11 -0
- data/spec/test-site/css/main.scss +50 -0
- data/spec/test-site/feed.xml +30 -0
- data/spec/test-site/index.html +23 -0
- data/spec/watcher_spec.rb +54 -0
- metadata +77 -3
@@ -0,0 +1,67 @@
|
|
1
|
+
/**
|
2
|
+
* Syntax highlighting styles
|
3
|
+
*/
|
4
|
+
.highlight {
|
5
|
+
background: #fff;
|
6
|
+
@extend %vertical-rhythm;
|
7
|
+
|
8
|
+
.c { color: #998; font-style: italic } // Comment
|
9
|
+
.err { color: #a61717; background-color: #e3d2d2 } // Error
|
10
|
+
.k { font-weight: bold } // Keyword
|
11
|
+
.o { font-weight: bold } // Operator
|
12
|
+
.cm { color: #998; font-style: italic } // Comment.Multiline
|
13
|
+
.cp { color: #999; font-weight: bold } // Comment.Preproc
|
14
|
+
.c1 { color: #998; font-style: italic } // Comment.Single
|
15
|
+
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
|
16
|
+
.gd { color: #000; background-color: #fdd } // Generic.Deleted
|
17
|
+
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
|
18
|
+
.ge { font-style: italic } // Generic.Emph
|
19
|
+
.gr { color: #a00 } // Generic.Error
|
20
|
+
.gh { color: #999 } // Generic.Heading
|
21
|
+
.gi { color: #000; background-color: #dfd } // Generic.Inserted
|
22
|
+
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
|
23
|
+
.go { color: #888 } // Generic.Output
|
24
|
+
.gp { color: #555 } // Generic.Prompt
|
25
|
+
.gs { font-weight: bold } // Generic.Strong
|
26
|
+
.gu { color: #aaa } // Generic.Subheading
|
27
|
+
.gt { color: #a00 } // Generic.Traceback
|
28
|
+
.kc { font-weight: bold } // Keyword.Constant
|
29
|
+
.kd { font-weight: bold } // Keyword.Declaration
|
30
|
+
.kp { font-weight: bold } // Keyword.Pseudo
|
31
|
+
.kr { font-weight: bold } // Keyword.Reserved
|
32
|
+
.kt { color: #458; font-weight: bold } // Keyword.Type
|
33
|
+
.m { color: #099 } // Literal.Number
|
34
|
+
.s { color: #d14 } // Literal.String
|
35
|
+
.na { color: #008080 } // Name.Attribute
|
36
|
+
.nb { color: #0086B3 } // Name.Builtin
|
37
|
+
.nc { color: #458; font-weight: bold } // Name.Class
|
38
|
+
.no { color: #008080 } // Name.Constant
|
39
|
+
.ni { color: #800080 } // Name.Entity
|
40
|
+
.ne { color: #900; font-weight: bold } // Name.Exception
|
41
|
+
.nf { color: #900; font-weight: bold } // Name.Function
|
42
|
+
.nn { color: #555 } // Name.Namespace
|
43
|
+
.nt { color: #000080 } // Name.Tag
|
44
|
+
.nv { color: #008080 } // Name.Variable
|
45
|
+
.ow { font-weight: bold } // Operator.Word
|
46
|
+
.w { color: #bbb } // Text.Whitespace
|
47
|
+
.mf { color: #099 } // Literal.Number.Float
|
48
|
+
.mh { color: #099 } // Literal.Number.Hex
|
49
|
+
.mi { color: #099 } // Literal.Number.Integer
|
50
|
+
.mo { color: #099 } // Literal.Number.Oct
|
51
|
+
.sb { color: #d14 } // Literal.String.Backtick
|
52
|
+
.sc { color: #d14 } // Literal.String.Char
|
53
|
+
.sd { color: #d14 } // Literal.String.Doc
|
54
|
+
.s2 { color: #d14 } // Literal.String.Double
|
55
|
+
.se { color: #d14 } // Literal.String.Escape
|
56
|
+
.sh { color: #d14 } // Literal.String.Heredoc
|
57
|
+
.si { color: #d14 } // Literal.String.Interpol
|
58
|
+
.sx { color: #d14 } // Literal.String.Other
|
59
|
+
.sr { color: #009926 } // Literal.String.Regex
|
60
|
+
.s1 { color: #d14 } // Literal.String.Single
|
61
|
+
.ss { color: #990073 } // Literal.String.Symbol
|
62
|
+
.bp { color: #999 } // Name.Builtin.Pseudo
|
63
|
+
.vc { color: #008080 } // Name.Variable.Class
|
64
|
+
.vg { color: #008080 } // Name.Variable.Global
|
65
|
+
.vi { color: #008080 } // Name.Variable.Instance
|
66
|
+
.il { color: #099 } // Literal.Number.Integer.Long
|
67
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
title: About
|
4
|
+
permalink: /about/
|
5
|
+
---
|
6
|
+
|
7
|
+
This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](http://jekyllrb.com/)
|
8
|
+
|
9
|
+
You can find the source code for the Jekyll new theme at: [github.com/jglovier/jekyll-new](https://github.com/jglovier/jekyll-new)
|
10
|
+
|
11
|
+
You can find the source code for Jekyll at [github.com/jekyll/jekyll](https://github.com/jekyll/jekyll)
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
# Only the main Sass file needs front matter (the dashes are enough)
|
3
|
+
layout: null
|
4
|
+
---
|
5
|
+
@charset "utf-8";
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
// Our variables
|
10
|
+
$base-font-family: Helvetica, Arial, sans-serif;
|
11
|
+
$base-font-size: 16px;
|
12
|
+
$small-font-size: $base-font-size * 0.875;
|
13
|
+
$base-line-height: 1.5;
|
14
|
+
|
15
|
+
$spacing-unit: 30px;
|
16
|
+
|
17
|
+
$text-color: #111;
|
18
|
+
$background-color: #fdfdfd;
|
19
|
+
$brand-color: #2a7ae2;
|
20
|
+
|
21
|
+
$grey-color: #828282;
|
22
|
+
$grey-color-light: lighten($grey-color, 40%);
|
23
|
+
$grey-color-dark: darken($grey-color, 25%);
|
24
|
+
|
25
|
+
$on-palm: 600px;
|
26
|
+
$on-laptop: 800px;
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
// Using media queries with like this:
|
31
|
+
// @include media-query($palm) {
|
32
|
+
// .wrapper {
|
33
|
+
// padding-right: $spacing-unit / 2;
|
34
|
+
// padding-left: $spacing-unit / 2;
|
35
|
+
// }
|
36
|
+
// }
|
37
|
+
@mixin media-query($device) {
|
38
|
+
@media screen and (max-width: $device) {
|
39
|
+
@content;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
// Import partials from `sass_dir` (defaults to `_sass`)
|
46
|
+
@import
|
47
|
+
"base",
|
48
|
+
"layout",
|
49
|
+
"syntax-highlighting"
|
50
|
+
;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
layout: null
|
3
|
+
---
|
4
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
5
|
+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
6
|
+
<channel>
|
7
|
+
<title>{{ site.title | xml_escape }}</title>
|
8
|
+
<description>{{ site.description | xml_escape }}</description>
|
9
|
+
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
10
|
+
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
|
11
|
+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
12
|
+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
13
|
+
<generator>Jekyll v{{ jekyll.version }}</generator>
|
14
|
+
{% for post in site.posts limit:10 %}
|
15
|
+
<item>
|
16
|
+
<title>{{ post.title | xml_escape }}</title>
|
17
|
+
<description>{{ post.content | xml_escape }}</description>
|
18
|
+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
19
|
+
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
|
20
|
+
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
|
21
|
+
{% for tag in post.tags %}
|
22
|
+
<category>{{ tag | xml_escape }}</category>
|
23
|
+
{% endfor %}
|
24
|
+
{% for cat in post.categories %}
|
25
|
+
<category>{{ cat | xml_escape }}</category>
|
26
|
+
{% endfor %}
|
27
|
+
</item>
|
28
|
+
{% endfor %}
|
29
|
+
</channel>
|
30
|
+
</rss>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<div class="home">
|
6
|
+
|
7
|
+
<h1 class="page-heading">Posts</h1>
|
8
|
+
|
9
|
+
<ul class="post-list">
|
10
|
+
{% for post in site.posts %}
|
11
|
+
<li>
|
12
|
+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
|
13
|
+
|
14
|
+
<h2>
|
15
|
+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
16
|
+
</h2>
|
17
|
+
</li>
|
18
|
+
{% endfor %}
|
19
|
+
</ul>
|
20
|
+
|
21
|
+
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
|
22
|
+
|
23
|
+
</div>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe(Jekyll::Watcher) do
|
4
|
+
let(:base_opts) do
|
5
|
+
{
|
6
|
+
'source' => source_dir,
|
7
|
+
'destination' => dest_dir
|
8
|
+
}
|
9
|
+
end
|
10
|
+
let(:options) { base_opts }
|
11
|
+
subject { described_class }
|
12
|
+
|
13
|
+
context "#build_listener" do
|
14
|
+
let(:listener) { subject.build_listener(options) }
|
15
|
+
|
16
|
+
it "returns a Listen::Listener" do
|
17
|
+
expect(listener).to be_a(Listen::Listener)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "ignores the config and site by default" do
|
21
|
+
expect(listener.options[:ignore]).to eql([/_config\.yml/, /_site/])
|
22
|
+
end
|
23
|
+
|
24
|
+
it "defaults to no force_polling" do
|
25
|
+
expect(listener.options[:force_polling]).to be(nil)
|
26
|
+
end
|
27
|
+
|
28
|
+
context "with force_polling turned on" do
|
29
|
+
let(:options) { base_opts.merge('force_polling' => true) }
|
30
|
+
let(:listener) { subject.build_listener(options) }
|
31
|
+
|
32
|
+
it "respects the custom value of force_polling" do
|
33
|
+
expect(listener.options[:force_polling]).to be(true)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context "#listen_ignore_paths" do
|
39
|
+
let(:ignored) { subject.listen_ignore_paths(options) }
|
40
|
+
|
41
|
+
it "ignores config.yml and _site by default" do
|
42
|
+
expect(ignored).to eql([/_config\.yml/, /_site/])
|
43
|
+
end
|
44
|
+
|
45
|
+
context "with something excluded" do
|
46
|
+
let(:options) { base_opts.merge('exclude' => ['README.md', 'LICENSE']) }
|
47
|
+
|
48
|
+
it "ignores the excluded files" do
|
49
|
+
expect(ignored).to include(/README\.md/)
|
50
|
+
expect(ignored).to include(/LICENSE/)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-watch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|
@@ -52,6 +52,34 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jekyll
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.0'
|
55
83
|
description:
|
56
84
|
email:
|
57
85
|
- parkrmoore@gmail.com
|
@@ -60,13 +88,40 @@ extensions: []
|
|
60
88
|
extra_rdoc_files: []
|
61
89
|
files:
|
62
90
|
- ".gitignore"
|
91
|
+
- ".travis.yml"
|
63
92
|
- Gemfile
|
93
|
+
- History.markdown
|
64
94
|
- LICENSE.txt
|
65
95
|
- README.md
|
66
96
|
- Rakefile
|
67
97
|
- jekyll-watch.gemspec
|
68
98
|
- lib/jekyll-watch.rb
|
69
99
|
- lib/jekyll/commands/watch.rb
|
100
|
+
- lib/jekyll/watcher.rb
|
101
|
+
- script/bootstrap
|
102
|
+
- script/cibuild
|
103
|
+
- script/test
|
104
|
+
- script/test-watcher
|
105
|
+
- script/unbundle
|
106
|
+
- spec/spec_helper.rb
|
107
|
+
- spec/test-site/.gitignore
|
108
|
+
- spec/test-site/_config.dev.toml
|
109
|
+
- spec/test-site/_config.yml
|
110
|
+
- spec/test-site/_includes/footer.html
|
111
|
+
- spec/test-site/_includes/head.html
|
112
|
+
- spec/test-site/_includes/header.html
|
113
|
+
- spec/test-site/_layouts/default.html
|
114
|
+
- spec/test-site/_layouts/page.html
|
115
|
+
- spec/test-site/_layouts/post.html
|
116
|
+
- spec/test-site/_posts/2014-08-08-welcome-to-jekyll.markdown
|
117
|
+
- spec/test-site/_sass/_base.scss
|
118
|
+
- spec/test-site/_sass/_layout.scss
|
119
|
+
- spec/test-site/_sass/_syntax-highlighting.scss
|
120
|
+
- spec/test-site/about.md
|
121
|
+
- spec/test-site/css/main.scss
|
122
|
+
- spec/test-site/feed.xml
|
123
|
+
- spec/test-site/index.html
|
124
|
+
- spec/watcher_spec.rb
|
70
125
|
homepage: https://github.com/jekyll/jekyll-watch
|
71
126
|
licenses:
|
72
127
|
- MIT
|
@@ -91,4 +146,23 @@ rubygems_version: 2.2.2
|
|
91
146
|
signing_key:
|
92
147
|
specification_version: 4
|
93
148
|
summary: Rebuild your Jekyll site when a file changes with the `--watch` switch.
|
94
|
-
test_files:
|
149
|
+
test_files:
|
150
|
+
- spec/spec_helper.rb
|
151
|
+
- spec/test-site/.gitignore
|
152
|
+
- spec/test-site/_config.dev.toml
|
153
|
+
- spec/test-site/_config.yml
|
154
|
+
- spec/test-site/_includes/footer.html
|
155
|
+
- spec/test-site/_includes/head.html
|
156
|
+
- spec/test-site/_includes/header.html
|
157
|
+
- spec/test-site/_layouts/default.html
|
158
|
+
- spec/test-site/_layouts/page.html
|
159
|
+
- spec/test-site/_layouts/post.html
|
160
|
+
- spec/test-site/_posts/2014-08-08-welcome-to-jekyll.markdown
|
161
|
+
- spec/test-site/_sass/_base.scss
|
162
|
+
- spec/test-site/_sass/_layout.scss
|
163
|
+
- spec/test-site/_sass/_syntax-highlighting.scss
|
164
|
+
- spec/test-site/about.md
|
165
|
+
- spec/test-site/css/main.scss
|
166
|
+
- spec/test-site/feed.xml
|
167
|
+
- spec/test-site/index.html
|
168
|
+
- spec/watcher_spec.rb
|