jekyll-autoprefixer 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.md +21 -0
- data/README.md +55 -0
- data/lib/jekyll-autoprefixer.rb +25 -0
- data/lib/jekyll/autoprefixer.rb +11 -0
- data/lib/jekyll/autoprefixer/autoprefixer.rb +34 -0
- data/lib/jekyll/autoprefixer/version.rb +5 -0
- data/lib/jekyll/patches.rb +4 -0
- data/lib/jekyll/patches/jekyll/site.rb +8 -0
- metadata +94 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 687d6a17f9f4012f3bf862f5da7c10b7bacd97c1
|
4
|
+
data.tar.gz: 3ba7635dd2e9b301993006a149cf4a56dcb5b6a6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2ac2af0c3193d713948b547478e4b87c35fb421e1cb7e2236857aafcf8b5528bc183f145cc4d27fbe244ef549aedd05839cdd229bc21f0675c60d424078c2de7
|
7
|
+
data.tar.gz: f4e7ddf629c4ab972fe051e117e53272bc99fcb903b37e6f4595900944965b9cb644f2742cbcd96bca884c0b8824c41cdebebf9bde26bccb029e9d1aebb9983c
|
data/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Vincent Wochnik.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Jekyll Autoprefixer [![Gem Version](https://badge.fury.io/rb/jekyll-autoprefixer.png)](http://badge.fury.io/rb/jekyll-autoprefixer)
|
2
|
+
|
3
|
+
> Autoprefixer integration for Jekyll
|
4
|
+
|
5
|
+
This plugin provides simple autoprefixer support for Jekyll.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
This plugin is available as a [RubyGem][ruby-gem].
|
10
|
+
|
11
|
+
Add this line to your application's `Gemfile`:
|
12
|
+
|
13
|
+
```
|
14
|
+
gem 'jekyll-autoprefixer'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute the `bundle` command to install the gem.
|
18
|
+
|
19
|
+
Alternatively, you can also manually install the gem using the following command:
|
20
|
+
|
21
|
+
```
|
22
|
+
$ gem install jekyll-autoprefixer
|
23
|
+
```
|
24
|
+
|
25
|
+
After the plugin has been installed successfully, add the following lines to your `_config.yml` in order to tell Jekyll to use the plugin:
|
26
|
+
|
27
|
+
```
|
28
|
+
gems:
|
29
|
+
- jekyll-autoprefixer
|
30
|
+
```
|
31
|
+
|
32
|
+
## Getting Started
|
33
|
+
|
34
|
+
No additional steps are required. All written CSS files inside the destination
|
35
|
+
directory are overwritten with the output of autoprefixer.
|
36
|
+
|
37
|
+
Optionally, you can specify the browsers for which autoprefixer is supposed to generate prefixes inside your configuration:
|
38
|
+
|
39
|
+
```
|
40
|
+
autoprefixer:
|
41
|
+
browsers:
|
42
|
+
- last 2 versions
|
43
|
+
```
|
44
|
+
|
45
|
+
# Contribute
|
46
|
+
|
47
|
+
Fork this repository, make your changes and then issue a pull request. If you find bugs or have new ideas that you do not want to implement yourself, file a bug report.
|
48
|
+
|
49
|
+
# Copyright
|
50
|
+
|
51
|
+
Copyright (c) 2015 Vincent Wochnik.
|
52
|
+
|
53
|
+
License: MIT
|
54
|
+
|
55
|
+
[ruby-gem]: https://rubygems.org/gems/jekyll-email-protect
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Frozen-string-literal: true
|
2
|
+
# Encoding: utf-8
|
3
|
+
|
4
|
+
require 'jekyll'
|
5
|
+
|
6
|
+
require_relative 'jekyll/patches'
|
7
|
+
require_relative 'jekyll/autoprefixer'
|
8
|
+
|
9
|
+
Jekyll::Hooks.register :site, :after_reset do |site|
|
10
|
+
# create new autoprefixer instance
|
11
|
+
site.autoprefixer = Jekyll::Autoprefixer::Autoprefixer.new(site)
|
12
|
+
end
|
13
|
+
|
14
|
+
Jekyll::Hooks.register :site, :post_render do |site|
|
15
|
+
site.each_site_file do |item|
|
16
|
+
if site.regenerator.regenerate?(item)
|
17
|
+
ext = File.extname(item.destination(site.dest))
|
18
|
+
site.autoprefixer.batch.push(item) if ext == ".css"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
Jekyll::Hooks.register :site, :post_write do |site|
|
24
|
+
site.autoprefixer.process
|
25
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Frozen-string-literal: true
|
2
|
+
# Encoding: utf-8
|
3
|
+
|
4
|
+
require 'autoprefixer-rails'
|
5
|
+
|
6
|
+
module Jekyll
|
7
|
+
module Autoprefixer
|
8
|
+
class Autoprefixer
|
9
|
+
attr_reader :site, :batch
|
10
|
+
|
11
|
+
def initialize(site)
|
12
|
+
@site = site
|
13
|
+
@batch = Array.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def process()
|
17
|
+
options = @site.config['autoprefixer'] || {}
|
18
|
+
|
19
|
+
@batch.each do |item|
|
20
|
+
path = item.destination(@site.dest)
|
21
|
+
|
22
|
+
File.open(path, 'r+') do |file|
|
23
|
+
content = file.read
|
24
|
+
file.truncate(0)
|
25
|
+
file.rewind
|
26
|
+
file.write(AutoprefixerRails.process(content, options))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
@batch.clear
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-autoprefixer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vincent Wochnik
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: autoprefixer-rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.3.6
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.3.6
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jekyll
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.1.2
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.1.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.6'
|
55
|
+
description: Autoprefixer integration for Jekyll
|
56
|
+
email:
|
57
|
+
- v.wochnik@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- lib/jekyll/autoprefixer/autoprefixer.rb
|
63
|
+
- lib/jekyll/autoprefixer/version.rb
|
64
|
+
- lib/jekyll/autoprefixer.rb
|
65
|
+
- lib/jekyll/patches/jekyll/site.rb
|
66
|
+
- lib/jekyll/patches.rb
|
67
|
+
- lib/jekyll-autoprefixer.rb
|
68
|
+
- README.md
|
69
|
+
- LICENSE.md
|
70
|
+
homepage: https://github.com/vwochnik/jekyll-autoprefixer
|
71
|
+
licenses:
|
72
|
+
- MIT
|
73
|
+
metadata: {}
|
74
|
+
post_install_message:
|
75
|
+
rdoc_options: []
|
76
|
+
require_paths:
|
77
|
+
- lib
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.9.3
|
83
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
requirements: []
|
89
|
+
rubyforge_project:
|
90
|
+
rubygems_version: 2.0.14.1
|
91
|
+
signing_key:
|
92
|
+
specification_version: 4
|
93
|
+
summary: This plugin provides simple autoprefixer support for Jekyll.
|
94
|
+
test_files: []
|