glim-sass-converter 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/glim-sass-converter.rb +33 -0
  3. metadata +72 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9a25ffc18bc1b19c2e6ab4d7699af6343ea3d3b6534290bc855da8dfffdd6ed2
4
+ data.tar.gz: 15b033e9e1d5842a8f2f178f3e2b295ca76e17618ce55af00683e09c4f879c46
5
+ SHA512:
6
+ metadata.gz: 2c1a42af37277780c1a66103011699e0bfaec3435a649b2c297f118ff881ef438d1ee22d7a0a4eb1ed694bc893b1c8b9ed338f52d65def9016e9d806e2edf6c1
7
+ data.tar.gz: 52be7a77d455a3d71785b3ce1dff4b07c73bfd85acdd4805162c1cee0a90d7c6f30a881984af586cc9b9868d8eda82ad02a741acab5cd7534119271a8e64ab10
@@ -0,0 +1,33 @@
1
+ module Jekyll
2
+ def self.sanitized_path(path, dir)
3
+ File.expand_path(path, dir)
4
+ end
5
+ end
6
+
7
+ module GlimExtensions
8
+ class Sass < Glim::Filter
9
+ transforms 'scss' => 'css', 'sass' => 'css'
10
+
11
+ @@did_require_sass_converter = false
12
+
13
+ def initialize(site)
14
+ unless @@did_require_sass_converter
15
+ @@did_require_sass_converter = true
16
+ begin
17
+ require 'jekyll-sass-converter'
18
+ rescue LoadError => e
19
+ STDERR << "Error loading ‘jekyll-sass-converter’: #{e}\n"
20
+ end
21
+ end
22
+
23
+ @converters ||= Jekyll::Plugin.plugins_of_type(Jekyll::Converter).sort.map { |klass| klass.new(site.config) }
24
+ end
25
+
26
+ def transform(content, page, options)
27
+ if converter = @converters.find { |c| c.matches(page.extname) }
28
+ content = converter.convert(content)
29
+ end
30
+ content
31
+ end
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: glim-sass-converter
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - Allan Odgaard
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-09-27 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: '3.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-sass-converter
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ description:
42
+ email:
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - glim-sass-converter.rb
48
+ homepage: https://macromates.com/glim/
49
+ licenses:
50
+ - MIT
51
+ metadata: {}
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - "."
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubyforge_project:
68
+ rubygems_version: 2.7.6
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: Wrapper for jekyll-sass-converter.
72
+ test_files: []