jekyll-compass 0.1.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +19 -0
- data/README.md +40 -0
- data/lib/jekyll-compass.rb +4 -0
- data/lib/jekyll/compass.rb +69 -0
- metadata +77 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 834fa0dc5da7d8e72e82baf5f8231af8a93001e1
|
4
|
+
data.tar.gz: 543e07c824be1fcc491d1647ea1c31be6dc99ad7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 361d7aa52b0c4666940d7cbdd4a0bb92b2fc0869871f6c8c62d2b73dc40f3ec4b8eaad3c340a38fdfc0762565716485ca1025f3dace2317f3b72f98c03a0c057
|
7
|
+
data.tar.gz: 8dcab979a2fbb80cf57051a292aebd3f9602a2ba61b994c609ab4b7917aad277736487d9929a6bffeffa1a453eee24fe529c3965232bd4d2e452781d55ad74f1
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2013 Matthew Scharley
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
4
|
+
copy of this software and associated documentation files (the "Software"),
|
5
|
+
to deal in the Software without restriction, including without limitation
|
6
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
7
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
8
|
+
Software is furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included
|
11
|
+
in all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
14
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
16
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
18
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
19
|
+
DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
jekyll-compass: Compass generator for Jekyll websites
|
2
|
+
=====================================================
|
3
|
+
|
4
|
+
**GitHub:** https://github.com/mscharley/jekyll-compass
|
5
|
+
**Author:** Matthew Scharley
|
6
|
+
**Contributors:** [See contributors on GitHub][gh-contrib]
|
7
|
+
**Bugs/Support:** [Github Issues][gh-issues]
|
8
|
+
**Copyright:** 2013
|
9
|
+
**License:** [MIT license][license]
|
10
|
+
|
11
|
+
Synopsis
|
12
|
+
--------
|
13
|
+
|
14
|
+
jekyll-compass is a jekyll plugin that provides an interface between Jekyll's building commands and the Compass
|
15
|
+
libraries to automatically build your Compass SASS files during a regular website build. This means your CSS files
|
16
|
+
end up directly in your `_site` output folder and never need to be checked into your version control.
|
17
|
+
|
18
|
+
Installation
|
19
|
+
------------
|
20
|
+
|
21
|
+
This plugin has a very simple two step install:
|
22
|
+
|
23
|
+
1. Install the gem:
|
24
|
+
|
25
|
+
gem install jekyll-compass
|
26
|
+
|
27
|
+
2. Add the gem to your jekyll website's `_config.yml` file:
|
28
|
+
|
29
|
+
gems:
|
30
|
+
- jekyll-compass
|
31
|
+
|
32
|
+
Usage
|
33
|
+
-----
|
34
|
+
|
35
|
+
Simply setup your SASS files in the `_sass` folder in your websites root folder. Then run `jekyll build` and watch the
|
36
|
+
magic.
|
37
|
+
|
38
|
+
[license]: https://raw.github.com/mscharley/jekyll-compass/master/LICENSE
|
39
|
+
[gh-contrib]: https://github.com/mscharley/jekyll-compass/graphs/contributors
|
40
|
+
[gh-issues]: https://github.com/mscharley/jekyll-compass/issues
|
@@ -0,0 +1,69 @@
|
|
1
|
+
|
2
|
+
require 'sass/plugin'
|
3
|
+
require 'compass'
|
4
|
+
require 'compass/commands'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
module Jekyll
|
8
|
+
class CompassFile < StaticFile
|
9
|
+
def write(destination)
|
10
|
+
# Short-circuit to the inevitable
|
11
|
+
false
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Compass < Generator
|
16
|
+
safe true
|
17
|
+
priority :high
|
18
|
+
|
19
|
+
def generate(site)
|
20
|
+
input = File.join(site.source, '_sass')
|
21
|
+
|
22
|
+
return unless File.exist? input
|
23
|
+
puts
|
24
|
+
|
25
|
+
output = File.join(site.config['destination'], 'css')
|
26
|
+
|
27
|
+
config = {
|
28
|
+
:project_path => site.source,
|
29
|
+
:http_path => '/',
|
30
|
+
:sass_path => input,
|
31
|
+
:css_path => output,
|
32
|
+
:images_path => File.join(site.source, 'images'),
|
33
|
+
:javascripts_path => File.join(site.source, 'js'),
|
34
|
+
:line_comments => false,
|
35
|
+
:environment => :production,
|
36
|
+
:output_style => :compact,
|
37
|
+
#:quiet => true,
|
38
|
+
:sass_options => {
|
39
|
+
:unix_newlines => true,
|
40
|
+
},
|
41
|
+
}
|
42
|
+
|
43
|
+
::Compass.add_configuration(config, 'Jekyll::Compass')
|
44
|
+
::Compass.configuration.on_sprite_saved do |filename|
|
45
|
+
site.static_files << StaticFile.new(site, site.source, File.dirname(filename)[site.source.length..-1], File.basename(filename))
|
46
|
+
end
|
47
|
+
::Compass.configuration.on_stylesheet_saved do |filename|
|
48
|
+
source = site.config['destination']
|
49
|
+
site.static_files << CompassFile.new(site, source, File.dirname(filename)[source.length..-1], File.basename(filename))
|
50
|
+
end
|
51
|
+
|
52
|
+
# Manually mangle the output directory to keep it in sync with what Compass expects and Jekyll produces
|
53
|
+
::Compass.configuration.on_sprite_removed do |filename|
|
54
|
+
site.static_files = site.static_files.select do |p|
|
55
|
+
if p.path == filename
|
56
|
+
sprite_output p.destination(site.config['destination'])
|
57
|
+
File.delete sprite_output if File.exist? sprite_output
|
58
|
+
false
|
59
|
+
else
|
60
|
+
true
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
::Compass::Commands::UpdateProject.new(site.config['source'], config).execute
|
66
|
+
nil
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-compass
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0.rc.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matthew Scharley
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: compass
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.12'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jekyll
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.3.0.rc
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.3.0.rc
|
41
|
+
description: |2
|
42
|
+
This project is a plugin for the Jekyll static website generator to allow for using Compass projects with your
|
43
|
+
Jekyll website. Compass is an extension library for the CSS preprocessor SASS.
|
44
|
+
email: matt.scharley@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- lib/jekyll/compass.rb
|
50
|
+
- lib/jekyll-compass.rb
|
51
|
+
- README.md
|
52
|
+
- LICENSE
|
53
|
+
homepage: https://github.com/mscharley/jekyll-compass
|
54
|
+
licenses:
|
55
|
+
- MIT
|
56
|
+
metadata: {}
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options: []
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - '>'
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.3.1
|
71
|
+
requirements: []
|
72
|
+
rubyforge_project:
|
73
|
+
rubygems_version: 2.0.3
|
74
|
+
signing_key:
|
75
|
+
specification_version: 4
|
76
|
+
summary: Jekyll generator plugin to build Compass projects during site build
|
77
|
+
test_files: []
|