jekyll-font-awesome-sass 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0ca691431704eb98e3649bf5f9c86aa1aa2d7112
4
+ data.tar.gz: 75c57b095acb4936dbc0c84bffa709d177b28c39
5
+ SHA512:
6
+ metadata.gz: 68e15fccdc6a2e1160f3ef10f4d61927f84adc440c34d69fc2bc7fc6e53b4d6e17f553877153bd6f7d7dea36c0ae7119b215583b665aebaa1bdb22cf5c0ffcc4
7
+ data.tar.gz: cf4d6d5f63cc7389e16d91feb44f95b373e0bc7521b7933025e8132e414fe900c0f59455ac49022218a77dd67a02b373b583a0f6faa150878bfe15046f53437e
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
@@ -0,0 +1,49 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # yard generated
9
+ doc
10
+ .yardoc
11
+
12
+ # bundler
13
+ .bundle
14
+
15
+ # juwelier generated
16
+ pkg
17
+
18
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
+ #
20
+ # * Create a file at ~/.gitignore
21
+ # * Include files you want ignored
22
+ # * Run: git config --global core.excludesfile ~/.gitignore
23
+ #
24
+ # After doing this, these files will be ignored in all your git projects,
25
+ # saving you from having to 'pollute' every project you touch with them
26
+ #
27
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
28
+ #
29
+ # For MacOS:
30
+ #
31
+ #.DS_Store
32
+
33
+ # For TextMate
34
+ #*.tmproj
35
+ #tmtags
36
+
37
+ # For emacs:
38
+ #*~
39
+ #\#*
40
+ #.\#*
41
+
42
+ # For vim:
43
+ #*.swp
44
+
45
+ # For redcar:
46
+ #.redcar
47
+
48
+ # For rubinius:
49
+ #*.rbc
@@ -0,0 +1,322 @@
1
+ require: rubocop/cop/github
2
+
3
+ AllCops:
4
+ DisabledByDefault: true
5
+
6
+ Bundler/DuplicatedGem:
7
+ Enabled: true
8
+
9
+ Bundler/OrderedGems:
10
+ Enabled: true
11
+
12
+ Lint/BlockAlignment:
13
+ Enabled: true
14
+
15
+ Lint/CircularArgumentReference:
16
+ Enabled: true
17
+
18
+ Lint/ConditionPosition:
19
+ Enabled: true
20
+
21
+ Lint/Debugger:
22
+ Enabled: true
23
+
24
+ Lint/DefEndAlignment:
25
+ Enabled: true
26
+
27
+ Lint/DeprecatedClassMethods:
28
+ Enabled: true
29
+
30
+ Lint/DuplicateMethods:
31
+ Enabled: true
32
+
33
+ Lint/DuplicatedKey:
34
+ Enabled: true
35
+
36
+ Lint/EachWithObjectArgument:
37
+ Enabled: true
38
+
39
+ Lint/ElseLayout:
40
+ Enabled: true
41
+
42
+ Lint/EmptyEnsure:
43
+ Enabled: true
44
+
45
+ Lint/EndInMethod:
46
+ Enabled: true
47
+
48
+ Lint/EmptyInterpolation:
49
+ Enabled: true
50
+
51
+ Lint/EndAlignment:
52
+ Enabled: false
53
+
54
+ Lint/EnsureReturn:
55
+ Enabled: true
56
+
57
+ Lint/FloatOutOfRange:
58
+ Enabled: true
59
+
60
+ Lint/FormatParameterMismatch:
61
+ Enabled: true
62
+
63
+ Style/HashSyntax:
64
+ Enabled: true
65
+ EnforcedStyle: ruby19
66
+
67
+ Lint/InvalidCharacterLiteral:
68
+ Enabled: true
69
+
70
+ Lint/LiteralInCondition:
71
+ Enabled: true
72
+
73
+ Lint/LiteralInInterpolation:
74
+ Enabled: true
75
+
76
+ Lint/Loop:
77
+ Enabled: true
78
+
79
+ Lint/NextWithoutAccumulator:
80
+ Enabled: true
81
+
82
+ Lint/RandOne:
83
+ Enabled: true
84
+
85
+ Lint/RequireParentheses:
86
+ Enabled: true
87
+
88
+ Lint/RescueException:
89
+ Enabled: true
90
+
91
+ Lint/StringConversionInInterpolation:
92
+ Enabled: true
93
+
94
+ Lint/UnderscorePrefixedVariableName:
95
+ Enabled: true
96
+
97
+ Lint/UnneededDisable:
98
+ Enabled: true
99
+
100
+ Lint/UnneededSplatExpansion:
101
+ Enabled: true
102
+
103
+ Lint/UnreachableCode:
104
+ Enabled: true
105
+
106
+ Lint/UselessComparison:
107
+ Enabled: true
108
+
109
+ Lint/UselessSetterCall:
110
+ Enabled: true
111
+
112
+ Lint/Void:
113
+ Enabled: true
114
+
115
+ Metrics/AbcSize:
116
+ Enabled: false
117
+
118
+ Metrics/BlockLength:
119
+ Enabled: false
120
+
121
+ Metrics/BlockNesting:
122
+ Enabled: false
123
+
124
+ Metrics/ClassLength:
125
+ Enabled: false
126
+
127
+ Metrics/CyclomaticComplexity:
128
+ Enabled: false
129
+
130
+ Metrics/LineLength:
131
+ Enabled: false
132
+
133
+ Metrics/MethodLength:
134
+ Enabled: false
135
+
136
+ Metrics/ModuleLength:
137
+ Enabled: false
138
+
139
+ Metrics/ParameterLists:
140
+ Enabled: false
141
+
142
+ Metrics/PerceivedComplexity:
143
+ Enabled: false
144
+
145
+ Performance/CaseWhenSplat:
146
+ Enabled: false
147
+
148
+ Performance/Count:
149
+ Enabled: true
150
+
151
+ Performance/Detect:
152
+ Enabled: true
153
+
154
+ Performance/DoubleStartEndWith:
155
+ Enabled: true
156
+
157
+ Performance/EndWith:
158
+ Enabled: true
159
+
160
+ Performance/FlatMap:
161
+ Enabled: true
162
+
163
+ Performance/HashEachMethods:
164
+ Enabled: true
165
+
166
+ Performance/LstripRstrip:
167
+ Enabled: true
168
+
169
+ Performance/RangeInclude:
170
+ Enabled: false
171
+
172
+ Performance/RedundantMatch:
173
+ Enabled: false
174
+
175
+ Performance/RedundantMerge:
176
+ Enabled: true
177
+ MaxKeyValuePairs: 1
178
+
179
+ Performance/RedundantSortBy:
180
+ Enabled: true
181
+
182
+ Performance/ReverseEach:
183
+ Enabled: true
184
+
185
+ Performance/Sample:
186
+ Enabled: true
187
+
188
+ Performance/Size:
189
+ Enabled: true
190
+
191
+ Performance/StartWith:
192
+ Enabled: true
193
+
194
+ Security/Eval:
195
+ Enabled: true
196
+
197
+ Style/ArrayJoin:
198
+ Enabled: true
199
+
200
+ Style/AsciiIdentifiers:
201
+ Enabled: true
202
+
203
+ Style/BeginBlock:
204
+ Enabled: true
205
+
206
+ Style/BlockComments:
207
+ Enabled: true
208
+
209
+ Style/BlockEndNewline:
210
+ Enabled: true
211
+
212
+ Style/CaseEquality:
213
+ Enabled: true
214
+
215
+ Style/CharacterLiteral:
216
+ Enabled: true
217
+
218
+ Style/ClassAndModuleCamelCase:
219
+ Enabled: true
220
+
221
+ Style/ClassMethods:
222
+ Enabled: true
223
+
224
+ Style/Copyright:
225
+ Enabled: false
226
+
227
+ Style/DefWithParentheses:
228
+ Enabled: true
229
+
230
+ Style/EndBlock:
231
+ Enabled: true
232
+
233
+ Style/EndOfLine:
234
+ Enabled: true
235
+
236
+ Style/FileName:
237
+ Enabled: true
238
+
239
+ Style/FlipFlop:
240
+ Enabled: true
241
+
242
+ Style/For:
243
+ Enabled: true
244
+
245
+ Style/FrozenStringLiteralComment:
246
+ Enabled: true
247
+
248
+ Style/InitialIndentation:
249
+ Enabled: true
250
+
251
+ Style/LambdaCall:
252
+ Enabled: true
253
+
254
+ Style/MethodCallWithoutArgsParentheses:
255
+ Enabled: true
256
+
257
+ Style/MethodDefParentheses:
258
+ Enabled: true
259
+
260
+ Style/MethodName:
261
+ Enabled: true
262
+
263
+ Style/MultilineIfThen:
264
+ Enabled: true
265
+
266
+ Style/NilComparison:
267
+ Enabled: true
268
+
269
+ Style/Not:
270
+ Enabled: true
271
+
272
+ Style/OneLineConditional:
273
+ Enabled: true
274
+
275
+ Style/SpaceAfterMethodName:
276
+ Enabled: true
277
+
278
+ Style/SpaceAfterColon:
279
+ Enabled: true
280
+
281
+ Style/SpaceAfterComma:
282
+ Enabled: true
283
+
284
+ Style/SpaceAfterNot:
285
+ Enabled: true
286
+
287
+ Style/SpaceAfterSemicolon:
288
+ Enabled: true
289
+
290
+ Style/SpaceAroundBlockParameters:
291
+ Enabled: true
292
+
293
+ Style/SpaceAroundEqualsInParameterDefault:
294
+ Enabled: true
295
+
296
+ Style/SpaceInsideArrayPercentLiteral:
297
+ Enabled: true
298
+
299
+ Style/SpaceInsideBrackets:
300
+ Enabled: true
301
+
302
+ Style/SpaceInsideParens:
303
+ Enabled: true
304
+
305
+ Style/SpaceInsideRangeLiteral:
306
+ Enabled: true
307
+
308
+ Style/StabbyLambdaParentheses:
309
+ Enabled: true
310
+
311
+ Style/StringLiterals:
312
+ Enabled: true
313
+ EnforcedStyle: double_quotes
314
+
315
+ Style/Tab:
316
+ Enabled: true
317
+
318
+ Style/TrailingBlankLines:
319
+ Enabled: true
320
+
321
+ Style/TrailingWhitespace:
322
+ Enabled: true
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2017 andrew morton
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,56 @@
1
+ # Jekyll Font Awesome SASS
2
+
3
+ *A plugin to add the [FontAwesome::Sass](https://github.com/FortAwesome/font-awesome-sass) framework to your Jekyll site.*
4
+
5
+
6
+ ## Installation
7
+
8
+ Add the following to your site's `Gemfile`:
9
+
10
+ ```ruby
11
+ gem 'jekyll-font-awesome-sass'
12
+ ```
13
+
14
+ And add the following to your site's `_config.yml` file:
15
+
16
+ ```yaml
17
+ gems:
18
+ - jekyll-font-awesome-sass
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ Create a `.scss` file (e.g., `assets/style.scss`), with the following:
24
+
25
+ ```scss
26
+ ---
27
+ ---
28
+ $fa-font-path: "fonts/font-awesome/";
29
+ @import 'font-awesome';
30
+
31
+ // (Your custom CSS Here)
32
+ ```
33
+
34
+ When your site is built, Jekyll will automatically add the Font Awesome framework before it renders your site's css. In the above example, the resulting file would be `assets/style.css` with Font Awesome's CSS followed by your own.
35
+
36
+ ## Assets
37
+
38
+ By default, Jekyll Font Awesome SaSS will simply make the `@import 'font-awesome';` directive available to your custom stylesheets so that you can more easily include Font Awesome's CSS.
39
+
40
+ If you would like to use Font Awesome's static assets (e.g., fonts, javascripts), you'll need to add the following to your site's `_config.yml`:
41
+
42
+ ```yml
43
+ font-awesome:
44
+ assets: true
45
+ ```
46
+
47
+ This will create `/assets/fonts/font-awesome` and `assets/javascripts/font-awesome` folders in the generated site, which you can include in your site's header as you would any other javascript file or font.
48
+
49
+ ## Specifying the Font Awesome version
50
+
51
+ `jekyll-font-awesome-sass` relies on official [`font-awesome-sass` Ruby gem](https://github.com/FortAwesome/font-awesome-sass). To specify the version of Font Awesome used, simply specify the `font-awesome-sass` gem version in your Gemfile.
52
+
53
+
54
+ ## Credits
55
+
56
+ Just about everything in this gem is this is blatantly ripped off from [jekyll-bootstrap-sass](https://github.com/benbalter/jekyll-bootstrap-sass). It saved me a bunch of time getting this going.
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'jekyll-font-awesome-sass/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'jekyll-font-awesome-sass'
8
+ spec.version = Jekyll::FontAwesomeSass::VERSION
9
+ spec.authors = ['andrew morton']
10
+ spec.email = ['drewish@katherinehouse.com']
11
+
12
+ spec.summary = 'A plugin to add Twitter Bootstrap to your Jekyll site'
13
+ spec.homepage = 'https://github.com/drewish/jekyll-font-awesome-sass'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |file|
17
+ file.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_dependency 'jekyll', '>= 2.5', '< 4.0'
22
+ spec.add_dependency 'font-awesome-sass', '~> 4'
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.11'
25
+ spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'rspec', '~> 3.0'
27
+ spec.add_development_dependency 'rubocop', '~> 0.49.0'
28
+ end
@@ -0,0 +1,66 @@
1
+ require 'jekyll-font-awesome-sass/version'
2
+ require 'find'
3
+
4
+ # Require font-awesome-sass to add font-awesome to SaSS's load path
5
+ require 'font-awesome-sass'
6
+
7
+ module Jekyll
8
+ module FontAwesomeSass
9
+ class Generator < Jekyll::Generator
10
+ def generate(site)
11
+ @site = site
12
+
13
+ # Add our static files to Jekyll's native static file support
14
+ @site.static_files.concat static_files if assets_enabled?
15
+ end
16
+
17
+ private
18
+
19
+ # Has the user explictly disabled asset support by adding
20
+ # The following to their `_config.yml` file:
21
+ #
22
+ # font-awesome
23
+ # assets: false
24
+ def assets_enabled?
25
+ return false if @site.config['font-awesome'].nil?
26
+ @site.config['font-awesome']['assets'] == true
27
+ end
28
+
29
+ # Returns an array of Jekyll::StaticFile instances for each file
30
+ # in asset_files. Files are prefixed with an `assets/` directory
31
+ def static_files
32
+ source = File.dirname(assets_path)
33
+ asset_files.map do |file|
34
+ dir = File.dirname(file)
35
+ file_name = File.basename(file)
36
+ Jekyll::StaticFile.new @site, source, dir, file_name
37
+ end
38
+ end
39
+
40
+ # Return an array of paths to static files that should be included
41
+ # in the generated site.
42
+ #
43
+ # Note: All paths are relative to the assets_path directory
44
+ def asset_files
45
+ asset_files = []
46
+ Find.find(assets_path).each do |path|
47
+ next if File.directory?(path)
48
+ next if path.include?(stylesheets_path)
49
+ asset_files << path.sub(assets_path, 'assets')
50
+ end
51
+ asset_files
52
+ end
53
+
54
+ # Absolute path to font-awesome-sass's vendored static assets
55
+ def assets_path
56
+ @assets_path ||= FontAwesome::Sass.assets_path
57
+ end
58
+
59
+ # Absolute path to font-awesome-sass's stylesheets directory
60
+ # Which should be excluded because it's processed by SaSS
61
+ def stylesheets_path
62
+ @stylesheets_path ||= File.expand_path 'stylesheets/', assets_path
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,5 @@
1
+ module Jekyll
2
+ module FontAwesomeSass
3
+ VERSION = '0.1.0'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,143 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-font-awesome-sass
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - andrew morton
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-06-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '2.5'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '4.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '2.5'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '4.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: font-awesome-sass
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '4'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '4'
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.11'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.11'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '10.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '10.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '3.0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '3.0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rubocop
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: 0.49.0
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: 0.49.0
103
+ description:
104
+ email:
105
+ - drewish@katherinehouse.com
106
+ executables: []
107
+ extensions: []
108
+ extra_rdoc_files: []
109
+ files:
110
+ - ".document"
111
+ - ".gitignore"
112
+ - ".rubocop.yml"
113
+ - Gemfile
114
+ - LICENSE.txt
115
+ - README.markdown
116
+ - jekyll-font-awesome-sass.gemspec
117
+ - lib/jekyll-font-awesome-sass.rb
118
+ - lib/jekyll-font-awesome-sass/version.rb
119
+ homepage: https://github.com/drewish/jekyll-font-awesome-sass
120
+ licenses:
121
+ - MIT
122
+ metadata: {}
123
+ post_install_message:
124
+ rdoc_options: []
125
+ require_paths:
126
+ - lib
127
+ required_ruby_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ requirements: []
138
+ rubyforge_project:
139
+ rubygems_version: 2.5.1
140
+ signing_key:
141
+ specification_version: 4
142
+ summary: A plugin to add Twitter Bootstrap to your Jekyll site
143
+ test_files: []