octopress-ink 1.0.0.alpha.15 → 1.0.0.alpha.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/lib/octopress-ink.rb +3 -3
  3. data/lib/octopress-ink/assets/asset.rb +14 -3
  4. data/lib/octopress-ink/assets/include.rb +1 -1
  5. data/lib/octopress-ink/assets/sass.rb +6 -22
  6. data/lib/octopress-ink/assets/stylesheet.rb +12 -4
  7. data/lib/octopress-ink/plugin.rb +4 -5
  8. data/lib/octopress-ink/plugins.rb +33 -27
  9. data/lib/octopress-ink/plugins/stylesheets.rb +52 -0
  10. data/lib/octopress-ink/version.rb +1 -1
  11. data/octopress-ink.gemspec +1 -0
  12. data/test/_concat_css_false.yml +3 -0
  13. data/test/_config.yml +0 -16
  14. data/test/_sass_compact.yml +6 -0
  15. data/test/_sass_expanded.yml +5 -0
  16. data/test/concat_css/stylesheets/all-e10f647557c9d610df6df40a458bc823.css +1 -0
  17. data/test/concat_css/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css +1 -0
  18. data/test/concat_css_false/awesome-sauce/stylesheets/plugin-media-test.css +3 -0
  19. data/test/concat_css_false/awesome-sauce/stylesheets/plugin-test.css +4 -0
  20. data/test/concat_css_false/stylesheets/site.css +1 -0
  21. data/test/concat_css_false/stylesheets/test.css +1 -0
  22. data/test/concat_css_false/theme/stylesheets/theme-media-test.css +1 -0
  23. data/test/concat_css_false/theme/stylesheets/theme-test.css +4 -0
  24. data/test/concat_css_false/theme/stylesheets/theme-test2.css +3 -0
  25. data/test/expected/index.html +0 -9
  26. data/test/sass_compact/stylesheets/all-e10f647557c9d610df6df40a458bc823.css +22 -0
  27. data/test/sass_compact/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css +3 -0
  28. data/test/sass_expanded/stylesheets/all-e10f647557c9d610df6df40a458bc823.css +36 -0
  29. data/test/sass_expanded/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css +8 -0
  30. data/test/site/index.html +0 -9
  31. data/test/site/stylesheets/all-5f4148b9fde2541e99deb55ebf3fe695.css +36 -0
  32. data/test/site/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css +8 -0
  33. data/test/source/_custom/theme/stylesheets/_colors.sass +1 -0
  34. data/test/source/_custom/theme/stylesheets/theme-test.css +4 -0
  35. data/test/source/_plugins/awesome-sauce/stylesheets/plugin-media-test.css +3 -0
  36. data/test/source/_plugins/awesome-sauce/stylesheets/plugin-test.css +4 -0
  37. data/test/source/_plugins/bundler.rb +14 -11
  38. data/test/{expected/theme → source/_plugins/test-theme}/files/test.html +0 -0
  39. data/test/source/_plugins/{theme → test-theme}/includes/bar.html +0 -0
  40. data/test/source/_plugins/{theme → test-theme}/includes/foo.html +0 -0
  41. data/test/source/_plugins/{theme → test-theme}/javascripts/bar.js +0 -0
  42. data/test/source/_plugins/{theme → test-theme}/javascripts/foo.js +0 -0
  43. data/test/source/_plugins/{theme → test-theme}/layouts/default.html +0 -0
  44. data/test/source/_plugins/{theme → test-theme}/layouts/test.html +0 -0
  45. data/test/source/_plugins/test-theme/stylesheets/_colors.scss +1 -0
  46. data/test/source/_plugins/test-theme/stylesheets/main.scss +2 -0
  47. data/test/source/_plugins/test-theme/stylesheets/theme-media-test@print.css +1 -0
  48. data/test/source/_plugins/{theme/stylesheets/site.css → test-theme/stylesheets/theme-test.css} +1 -0
  49. data/test/source/_plugins/test-theme/stylesheets/theme-test2.css +3 -0
  50. data/test/source/stylesheets/test.css +1 -0
  51. data/test/test.rb +53 -20
  52. metadata +87 -47
  53. data/lib/octopress-ink/plugins/sass.rb +0 -20
  54. data/test/expected/javascripts/d41d8cd98f00b204e9800998ecf8427e.js +0 -2
  55. data/test/expected/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css +0 -1
  56. data/test/expected/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css +0 -1
  57. data/test/site/javascripts/d41d8cd98f00b204e9800998ecf8427e.js +0 -2
  58. data/test/site/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css +0 -1
  59. data/test/site/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css +0 -1
  60. data/test/site/theme/files/test.html +0 -1
  61. data/test/source/_custom/theme/stylesheets/_baz.sass +0 -1
  62. data/test/source/_custom/theme/stylesheets/site.css +0 -1
  63. data/test/source/_plugins/theme/files/test.html +0 -1
  64. data/test/source/_plugins/theme/stylesheets/_baz.scss +0 -1
  65. data/test/source/_plugins/theme/stylesheets/bar.scss +0 -4
  66. data/test/source/_plugins/theme/stylesheets/foo.css +0 -1
  67. data/test/source/_plugins/theme/stylesheets/print.css +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90fb70585fe1d4f7edbbaa1b3d2e3669b3014450
4
- data.tar.gz: dda5c5f03ffc61784957309400887f79c8c7596a
3
+ metadata.gz: aa21d7ff884dfda2459b338edfe7d06fd6f18a7f
4
+ data.tar.gz: 6bc328cd1284b07ca85f7c5e002396ab3bdf5f55
5
5
  SHA512:
6
- metadata.gz: 3d7e8812d7b06fa34355e92602bb3d57885012228132875f4877cf1e19b69ef7499dbe9fb84a55a1a026b714c5561b30bbd6de40df01a4342aaa8155ada7fee0
7
- data.tar.gz: e4e7be648642fac3335e419dbdd45388b680b0a8fe87b2aceb29b9435d4cab13720235c7372634b7f1530c3e24762f193fa61f6cf87fc32b6e5eb54c877f4c99
6
+ metadata.gz: b1ab05f90a48f9f18161cdaf3bfc4b61e5b4669e85fe78d2b3ee30738d25ce591b59cae7e05e3c773075089e1c781a1fd2cd27cb83d80675cee29973d83ad098
7
+ data.tar.gz: 1d39ca6d799a822141411cfd64cb5a2b962c4c8cb21d4e2d386a60dae804605908b5166948863b5b67fa54dcb069cce266f64534035a80c5588f0d8cac12c795
data/lib/octopress-ink.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'jekyll'
2
+ require 'sass'
2
3
  require 'digest/md5'
3
4
 
4
5
  require 'octopress-ink/version'
@@ -6,7 +7,6 @@ require 'octopress-ink/generators/plugin_assets'
6
7
  require 'octopress-ink/jekyll/hooks'
7
8
  require 'octopress-ink/version'
8
9
  require 'octopress-ink/helpers/content_for'
9
- require 'pry-debugger'
10
10
 
11
11
  module Octopress
12
12
  CUSTOM_DIR = "_custom"
@@ -17,7 +17,7 @@ module Octopress
17
17
  autoload :Plugins, 'octopress-ink/plugins'
18
18
  autoload :Plugin, 'octopress-ink/plugin'
19
19
  autoload :Tags, 'octopress-ink/tags'
20
- autoload :SassPlugin, 'octopress-ink/plugins/sass'
20
+ autoload :StylesheetsPlugin, 'octopress-ink/plugins/stylesheets'
21
21
 
22
22
  def self.register_plugin(plugin, name, type='plugin')
23
23
  Plugins.register_plugin(plugin, name, type)
@@ -34,5 +34,5 @@ Liquid::Template.register_tag('scripts', Octopress::Tags::ScriptsBlock)
34
34
  Liquid::Template.register_tag('yield', Octopress::Tags::YieldTag)
35
35
  Liquid::Template.register_tag('wrap_yield', Octopress::Tags::WrapYieldBlock)
36
36
 
37
- Octopress.register_plugin(Octopress::SassPlugin, 'sass', 'local_plugin')
37
+ Octopress.register_plugin(Octopress::StylesheetsPlugin, 'user stylesheets', 'local_plugin')
38
38
 
@@ -6,7 +6,6 @@ module Octopress
6
6
  @file = file
7
7
  @type = type
8
8
  @plugin = plugin
9
- @plugin_type = plugin.type
10
9
  @root = plugin.assets_path
11
10
  @dir = File.join(plugin.namespace, type)
12
11
  @exists = {}
@@ -20,7 +19,7 @@ module Octopress
20
19
  unless @found_file
21
20
  files = []
22
21
  files << user_path(site)
23
- files << plugin_path unless @plugin_type == 'local_plugin'
22
+ files << plugin_path unless @plugin.type == 'local_plugin'
24
23
  files = files.flatten.reject { |f| !exists? f }
25
24
 
26
25
  unless files.size
@@ -65,7 +64,7 @@ module Octopress
65
64
  end
66
65
 
67
66
  def user_path(site)
68
- if @plugin_type == 'local_plugin'
67
+ if @plugin.type == 'local_plugin'
69
68
  local_plugin_path(site)
70
69
  else
71
70
  user_override_path(site)
@@ -77,6 +76,18 @@ module Octopress
77
76
  alt_ext = ext == 'scss' ? 'sass' : 'scss'
78
77
  @file.sub(/\.#{ext}/, ".#{alt_ext}")
79
78
  end
79
+
80
+ # Remove files from Jekyll's static_files array so it doesn't end up in the
81
+ # compiled site directory.
82
+ #
83
+ def remove_jekyll_asset(site)
84
+ site.static_files.clone.each do |sf|
85
+ if sf.kind_of?(Jekyll::StaticFile) && sf.path == path(site).to_s
86
+ site.static_files.delete(sf)
87
+ end
88
+ end
89
+ end
90
+
80
91
 
81
92
  def exists?(file)
82
93
  @exists[file] ||= File.exists?(file)
@@ -3,9 +3,9 @@ module Octopress
3
3
  class Include < Asset
4
4
 
5
5
  def initialize(plugin, type)
6
- @plugin_type = plugin.type
7
6
  @root = plugin.assets_path
8
7
  @type = type
8
+ @plugin = plugin
9
9
  @dir = File.join(plugin.namespace, type)
10
10
  @exists = {}
11
11
  end
@@ -1,22 +1,18 @@
1
1
  module Octopress
2
2
  module Assets
3
- class Sass < Asset
3
+ class Sass < Stylesheet
4
4
  def initialize(plugin, type, file, media)
5
- @file = file
5
+ @plugin = plugin
6
6
  @type = type
7
- @plugin_type = plugin.type
7
+ @file = file
8
+ @media = media || 'all'
8
9
  @root = plugin.assets_path
9
10
  @dir = File.join(plugin.namespace, type)
10
11
  @exists = {}
11
- @media = media || 'all'
12
- end
13
-
14
- def media
15
- @media
16
12
  end
17
13
 
18
14
  def tag
19
- "<link href='/#{File.join(@dir, @file)}' media='#{@media}' rel='stylesheet' type='text/css'>"
15
+ "<link href='/#{File.join(@dir, @file)}' media='#{media}' rel='stylesheet' type='text/css'>"
20
16
  end
21
17
 
22
18
  # TODO: choose user path before local path.
@@ -28,22 +24,10 @@ module Octopress
28
24
  File.expand_path(File.join(@root, @type))
29
25
  end
30
26
 
31
- # Remove sass files from Jekyll's static_files array so it doesn't end up in the
32
- # compiled site directory.
33
- #
34
- def remove_static_file(site)
35
- site.static_files.clone.each do |sf|
36
- if sf.kind_of?(Jekyll::StaticFile) && sf.path == path(site).to_s
37
- site.static_files.delete(sf)
38
- end
39
- end
40
- end
41
-
42
27
  def compile(site)
43
28
  unless @compiled
44
29
  options = Plugins.sass_options(site)
45
- if @plugin_type == 'local_plugin'
46
- remove_static_file(site)
30
+ if @plugin.type == 'local_plugin'
47
31
  @compiled = Plugins.compile_sass_file(path(site).to_s, options)
48
32
  else
49
33
  # If the plugin isn't a local plugin, add source paths to allow overrieds on @imports.
@@ -2,21 +2,29 @@ module Octopress
2
2
  module Assets
3
3
  class Stylesheet < Asset
4
4
  def initialize(plugin, type, file, media)
5
+ @plugin = plugin
5
6
  @file = file
6
7
  @type = type
8
+ @media = media || 'all'
7
9
  @root = plugin.assets_path
8
10
  @dir = File.join(plugin.namespace, type)
9
- @plugin_type = plugin.type
10
- @media = media || 'all'
11
11
  @exists = {}
12
12
  end
13
13
 
14
14
  def media
15
- @media
15
+ m = @media
16
+ if @file =~ /@(.+?)\./
17
+ m = $1
18
+ end
19
+ m
20
+ end
21
+
22
+ def destination
23
+ File.join(@dir, @file.sub(/@(.+?)\./,'.'))
16
24
  end
17
25
 
18
26
  def tag
19
- "<link href='/#{File.join(@dir, @file)}' media='#{@media}' rel='stylesheet' type='text/css'>"
27
+ "<link href='/#{File.join(@dir, @file)}' media='#{media}' rel='stylesheet' type='text/css'>"
20
28
  end
21
29
  end
22
30
  end
@@ -44,11 +44,6 @@ module Octopress
44
44
  end
45
45
 
46
46
  def add_sass(file, media=nil)
47
- begin
48
- require 'sass'
49
- rescue LoadError
50
- raise IOError.new "The #{@name} #{@type} uses the Sass gem. You'll need to add it to your Gemfile or run `gem install sass`"
51
- end
52
47
  @sass << Assets::Sass.new(self, @stylesheets_dir, file, media)
53
48
  end
54
49
 
@@ -69,6 +64,10 @@ module Octopress
69
64
  end
70
65
  end
71
66
 
67
+ def remove_jekyll_assets(files, site)
68
+ files.each {|f| f.remove_jekyll_asset(site) }
69
+ end
70
+
72
71
  def add_includes
73
72
  @includes = Assets::Include.new(self, @includes_dir)
74
73
  end
@@ -11,9 +11,11 @@ module Octopress
11
11
  if name == 'theme'
12
12
  @theme
13
13
  else
14
- @plugins.concat(@local_plugins).each do |p|
15
- return p if p.name == name
14
+ found = plugins.reject { |p| p.name != name }
15
+ if found.empty?
16
+ raise IOError.new "No Theme or Plugin with the name '#{name}' was found."
16
17
  end
18
+ found.first
17
19
  end
18
20
  end
19
21
 
@@ -22,18 +24,20 @@ module Octopress
22
24
  end
23
25
 
24
26
  def self.include(name, file, site)
25
- plugin(name).include(file, site)
27
+ p = plugin(name)
28
+ p.include(file, site)
26
29
  end
27
30
 
28
31
  def self.register_plugin(plugin, name, type='plugin')
29
32
  new_plugin = plugin.new(name, type)
30
33
 
31
- if type == 'theme'
34
+ case type
35
+ when 'theme'
32
36
  @theme = new_plugin
33
- elsif type == 'local_plugin'
34
- @plugins << new_plugin
35
- else
37
+ when 'local_plugin'
36
38
  @local_plugins << new_plugin
39
+ else
40
+ @plugins << new_plugin
37
41
  end
38
42
  end
39
43
 
@@ -74,8 +78,8 @@ module Octopress
74
78
  end
75
79
 
76
80
  def self.sass_config(site, item, default)
77
- if site.config['sass'] && site.config['sass'][item]
78
- site.config['sass'][item]
81
+ if site.config['octopress'] && site.config['octopress']['sass'] && site.config['octopress']['sass'][item]
82
+ site.config['octopress']['sass'][item]
79
83
  else
80
84
  default
81
85
  end
@@ -109,7 +113,11 @@ module Octopress
109
113
  css = {}
110
114
  paths = {}
111
115
  plugins.each do |plugin|
112
- plugin_header = "/* #{name} #{plugin.type} */\n"
116
+ if plugin.type == 'theme'
117
+ plugin_header = "/* Theme: #{plugin.name} */\n"
118
+ else
119
+ plugin_header = "/* Plugin: #{plugin.name} */\n"
120
+ end
113
121
  stylesheets = plugin.stylesheets.clone.concat plugin.sass
114
122
  stylesheets.each do |file|
115
123
  css[file.media] ||= {}
@@ -179,11 +187,19 @@ module Octopress
179
187
  end
180
188
 
181
189
  def self.concat_css(site)
182
- site.config['octopress'] && site.config['octopress']['concat_css'] != false
190
+ if site.config['octopress'] && !site.config['octopress']['concat_css'].nil?
191
+ site.config['octopress']['concat_css'] != false
192
+ else
193
+ true
194
+ end
183
195
  end
184
196
 
185
197
  def self.concat_js(site)
186
- site.config['octopress'] && site.config['octopress']['concat_js'] != false
198
+ if site.config['octopress'] && !site.config['octopress']['concat_js'].nil?
199
+ site.config['octopress']['concat_js'] != false
200
+ else
201
+ true
202
+ end
187
203
  end
188
204
 
189
205
  def self.javascript_tags(site)
@@ -205,25 +221,15 @@ module Octopress
205
221
  end
206
222
 
207
223
  def self.copy_stylesheets(site)
208
- plugins.each do |plugin|
209
- stylesheets = plugin.stylesheets.clone.concat plugin.sass
210
- copy(stylesheets, site)
211
- end
212
- end
213
-
214
- def self.local_sass_files(site)
215
- if site.config['octopress'] && site.config['octopress']['sass'] && site.config['octopress']['sass']['files']
216
- sass_files = site.config['octopress']['sass']['files'] || []
217
- else
218
- files = Dir.glob(File.join(site.source, 'stylesheets', '**/*.s[ca]ss')).reject { |f| File.basename(f) =~ /^_/ }
219
- sass_files = files.map { |f| f.split('stylesheets/').last}
220
- end
221
- sass_files
224
+ stylesheets = plugins.clone.map {
225
+ |p| p.stylesheets.clone.concat(p.sass)
226
+ }.flatten
227
+ copy(stylesheets, site)
222
228
  end
223
229
 
224
230
  def self.add_static_files(site)
225
231
 
226
- plugin('sass').add_files(local_sass_files(site))
232
+ plugin('user stylesheets').add_files(site)
227
233
 
228
234
  # Copy/Generate Stylesheets
229
235
  #
@@ -0,0 +1,52 @@
1
+ # The CSS assets for this plugin are populated at runtime by the add_static_files method of
2
+ # the Plugins module.
3
+ #
4
+ module Octopress
5
+ class StylesheetsPlugin < Octopress::Plugin
6
+ def add_files(site)
7
+
8
+ add_stylesheets(local_stylesheets(site))
9
+
10
+ remove_jekyll_assets(@sass, site)
11
+
12
+ if Plugins.concat_css(site)
13
+ remove_jekyll_assets(@stylesheets, site)
14
+ end
15
+ end
16
+
17
+ def add_stylesheets(files)
18
+ files = [files] unless files.is_a? Array
19
+ files.each do |file|
20
+ # accept ['file', 'media_type']
21
+ if file.is_a? Array
22
+ if file.first =~ /\.css/
23
+ add_stylesheet file.first, file.last
24
+ else
25
+ add_sass file.first, file.last
26
+ end
27
+ # accept 'file'
28
+ else
29
+ if file =~ /\.css/
30
+ add_stylesheet file
31
+ else
32
+ add_sass file
33
+ end
34
+ end
35
+ end
36
+ files
37
+ end
38
+
39
+ def local_stylesheets(site)
40
+ if site.config['octopress'] && site.config['octopress']['stylesheets']
41
+ site.config['octopress']['stylesheets'] || []
42
+ else
43
+ dir = File.join(site.source, 'stylesheets/')
44
+ css = Dir.glob(File.join(dir, '**/*.css'))
45
+ sass = Dir.glob(File.join(dir, '**/*.s[ca]ss')).reject { |f| File.basename(f) =~ /^_.*?s[ac]ss/ }
46
+ files = css.concat sass
47
+ files.map { |f| f.split(dir).last }
48
+ end
49
+ end
50
+ end
51
+ end
52
+
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.0.0.alpha.15"
3
+ VERSION = "1.0.0.alpha.17"
4
4
  end
5
5
  end
@@ -23,5 +23,6 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "pry-debugger"
26
27
  end
27
28
 
@@ -0,0 +1,3 @@
1
+ # Sass configurations
2
+ octopress:
3
+ concat_css: false
data/test/_config.yml CHANGED
@@ -3,19 +3,3 @@ markdown: redcarpet
3
3
  pygments: true
4
4
  source: source
5
5
  destination: site
6
- exclude:
7
- - Gemfile
8
- - Gemfile.lock
9
- - test.rb
10
-
11
- # Sass configurations
12
- octopress:
13
- sass:
14
- #output_style: compact
15
- #line_numbers: true
16
- files:
17
- - [site.sass, all]
18
-
19
- #gem:
20
- #- octopress-plugins
21
-
@@ -0,0 +1,6 @@
1
+ # Sass configurations
2
+ octopress:
3
+ sass:
4
+ output_style: compact
5
+ line_numbers: true
6
+
@@ -0,0 +1,5 @@
1
+ # Sass configurations
2
+ octopress:
3
+ sass:
4
+ output_style: expanded
5
+
@@ -0,0 +1 @@
1
+ body{margin:2px;padding:2px}.main{color:#444}body{background:#000}.plugin-widget{background:red;color:#fff}.css-plugin{background:#fed}body{display:table}body{background:#aaa111}div{display:table}
@@ -0,0 +1 @@
1
+ *{background:none;color:#000}article a:after{content:attr(href)}
@@ -0,0 +1,3 @@
1
+ article a:after {
2
+ content: attr(href);
3
+ }
@@ -0,0 +1,4 @@
1
+ .plugin-widget {
2
+ background: red;
3
+ color: #fff;
4
+ }
@@ -0,0 +1 @@
1
+ body{display:table}body{background:#aaa111}div{display:table}
@@ -0,0 +1 @@
1
+ .css-plugin { background: #fed; }
@@ -0,0 +1 @@
1
+ * { background: none; color: #000; }
@@ -0,0 +1,4 @@
1
+ body {
2
+ margin: 2px;
3
+ padding: 2px;
4
+ }
@@ -0,0 +1,3 @@
1
+ .main {
2
+ color: #444;
3
+ }
@@ -10,8 +10,6 @@
10
10
  <div class='local-override'><p>Test plugin assets and overrides:</p>
11
11
 
12
12
  <ul>
13
- <li>layouts</li>
14
- <li>includes</li>
15
13
  <li>stylesheets</li>
16
14
  <li>javascripts</li>
17
15
  <li>files</li>
@@ -28,13 +26,6 @@
28
26
  <li>concat_css</li>
29
27
  <li>concat_js</li>
30
28
  </ul>
31
-
32
- <p>Test: markdown
33
- <strong>Hello World!</strong></p>
34
-
35
- <p>Test: head tag</p>
36
-
37
- <p>Testing Include booga</p>
38
29
  </div>
39
30
 
40
31
  </body>
@@ -0,0 +1,22 @@
1
+ /* Theme: classic */
2
+ body { margin: 2px; padding: 2px; }
3
+
4
+ .main { color: #444; }
5
+
6
+ /* line 2 */
7
+ body { background: black; }
8
+
9
+ /* Plugin: awesome-sauce */
10
+ .plugin-widget { background: red; color: #fff; }
11
+
12
+ /* Plugin: user stylesheets */
13
+ .css-plugin { background: #fed; }
14
+
15
+ /* line 1, /Users/imathis/workspace/octodev/ink/test/source/stylesheets/_foo.scss */
16
+ body { display: table; }
17
+
18
+ /* line 4, /Users/imathis/workspace/octodev/ink/test/source/stylesheets/site.sass */
19
+ body { background: #aaa111; }
20
+
21
+ /* line 6, /Users/imathis/workspace/octodev/ink/test/source/stylesheets/site.sass */
22
+ div { display: table; }
@@ -0,0 +1,3 @@
1
+ * { background: none; color: #000; }
2
+
3
+ article a:after { content: attr(href); }
@@ -0,0 +1,36 @@
1
+ /* Theme: classic */
2
+ body {
3
+ margin: 2px;
4
+ padding: 2px;
5
+ }
6
+
7
+ .main {
8
+ color: #444;
9
+ }
10
+
11
+ body {
12
+ background: black;
13
+ }
14
+
15
+ /* Plugin: awesome-sauce */
16
+ .plugin-widget {
17
+ background: red;
18
+ color: #fff;
19
+ }
20
+
21
+ /* Plugin: user stylesheets */
22
+ .css-plugin {
23
+ background: #fed;
24
+ }
25
+
26
+ body {
27
+ display: table;
28
+ }
29
+
30
+ body {
31
+ background: #aaa111;
32
+ }
33
+
34
+ div {
35
+ display: table;
36
+ }
@@ -0,0 +1,8 @@
1
+ * {
2
+ background: none;
3
+ color: #000;
4
+ }
5
+
6
+ article a:after {
7
+ content: attr(href);
8
+ }
data/test/site/index.html CHANGED
@@ -10,8 +10,6 @@
10
10
  <div class='local-override'><p>Test plugin assets and overrides:</p>
11
11
 
12
12
  <ul>
13
- <li>layouts</li>
14
- <li>includes</li>
15
13
  <li>stylesheets</li>
16
14
  <li>javascripts</li>
17
15
  <li>files</li>
@@ -28,13 +26,6 @@
28
26
  <li>concat_css</li>
29
27
  <li>concat_js</li>
30
28
  </ul>
31
-
32
- <p>Test: markdown
33
- <strong>Hello World!</strong></p>
34
-
35
- <p>Test: head tag</p>
36
-
37
- <p>Testing Include booga</p>
38
29
  </div>
39
30
 
40
31
  </body>
@@ -0,0 +1,36 @@
1
+ /* Theme: classic */
2
+ body {
3
+ margin: 2px;
4
+ padding: 2px;
5
+ }
6
+
7
+ .main {
8
+ color: #444;
9
+ }
10
+
11
+ body {
12
+ background: black;
13
+ }
14
+
15
+ /* Plugin: awesome-sauce */
16
+ .plugin-widget {
17
+ background: red;
18
+ color: #fff;
19
+ }
20
+
21
+ /* Plugin: user stylesheets */
22
+ .css-plugin {
23
+ background: #fed;
24
+ }
25
+
26
+ body {
27
+ display: table;
28
+ }
29
+
30
+ body {
31
+ background: #aaa111;
32
+ }
33
+
34
+ div {
35
+ display: table;
36
+ }
@@ -0,0 +1,8 @@
1
+ * {
2
+ background: none;
3
+ color: #000;
4
+ }
5
+
6
+ article a:after {
7
+ content: attr(href);
8
+ }
@@ -0,0 +1 @@
1
+ $bg: black
@@ -0,0 +1,4 @@
1
+ body {
2
+ margin: 2px;
3
+ padding: 2px;
4
+ }
@@ -0,0 +1,3 @@
1
+ article a:after {
2
+ content: attr(href);
3
+ }
@@ -0,0 +1,4 @@
1
+ .plugin-widget {
2
+ background: red;
3
+ color: #fff;
4
+ }
@@ -1,27 +1,30 @@
1
1
  require 'octopress-ink'
2
2
 
3
- class ClassicTheme < Octopress::Plugin
3
+ class TestTheme < Octopress::Plugin
4
4
  def initialize(name, type)
5
- @assets_path = File.expand_path(File.join(File.dirname(__FILE__), 'theme'))
5
+ @assets_path = File.expand_path(File.join(File.dirname(__FILE__), 'test-theme'))
6
6
  super
7
7
  end
8
-
9
8
  def add_assets
10
- add_stylesheets ['site.css','foo.css'], 'all'
11
- add_stylesheet 'print.css', 'print'
12
- add_javascripts ['foo.js', 'bar.js']
13
- add_sass 'bar.scss'
14
- add_file 'test.html'
9
+ add_stylesheets ['theme-test.css', 'theme-test2.css']
10
+ add_stylesheet 'theme-media-test@print.css'
11
+ add_sass 'main.scss'
15
12
  end
16
13
  end
17
14
 
18
- class AwesomeSauce < Octopress::Plugin
15
+ class TestPlugin < Octopress::Plugin
19
16
  def initialize(name, type)
20
17
  @assets_path = File.expand_path(File.join(File.dirname(__FILE__), 'awesome-sauce'))
21
18
  super
22
19
  end
20
+
21
+ def add_assets
22
+ add_stylesheet 'plugin-test.css'
23
+ add_stylesheet 'plugin-media-test.css', 'print'
24
+ super
25
+ end
23
26
  end
24
27
 
25
- Octopress.register_plugin(ClassicTheme, 'classic', 'theme')
26
- Octopress.register_plugin(AwesomeSauce, 'awesome-sauce')
28
+ Octopress.register_plugin(TestTheme, 'classic', 'theme')
29
+ Octopress.register_plugin(TestPlugin, 'awesome-sauce')
27
30
 
@@ -0,0 +1,2 @@
1
+ @import 'colors';
2
+ body { background: $bg; }
@@ -0,0 +1 @@
1
+ * { background: none; color: #000; }
@@ -0,0 +1,3 @@
1
+ .main {
2
+ color: #444;
3
+ }
@@ -0,0 +1 @@
1
+ .css-plugin { background: #fed; }
data/test/test.rb CHANGED
@@ -1,14 +1,9 @@
1
1
  require 'colorator'
2
2
 
3
- has_failed = false
4
- config = File.read("_config.yml")
5
- disabled = "#{config}minify_html: false"
6
- minify = "#{config}env: production"
7
- override_off = "#{config}env: production\nminify_html: false"
8
- override_on = "#{config}env: development\nminify_html: true"
9
-
10
- def test(file)
11
- if diff = diff_file(file)
3
+ has_failed = false
4
+
5
+ def test(file, dir)
6
+ if diff = diff_file(file, dir)
12
7
  puts "Failed #{file}".red
13
8
  puts diff
14
9
  has_failed = true
@@ -17,26 +12,64 @@ def test(file)
17
12
  end
18
13
  end
19
14
 
20
- def build
21
- `rm -rf site && bundle exec jekyll build --trace`
15
+ def build(config='')
16
+ config = ['_config.yml'] << config
17
+ `rm -rf site && bundle exec jekyll build --config #{config.join(',')}`
22
18
  end
23
19
 
24
- def diff_file(file)
25
- diff = `diff expected/#{file} site/#{file}`
26
- if diff.size > 0 && File.exist?("site/#{file}")
27
- diff
20
+ def diff_file(file, dir='expected')
21
+ if File.exist?(Dir.glob("site/#{file}").first)
22
+ diff = `diff #{dir}/#{file} site/#{file}`
23
+ if diff.size > 0
24
+ diff
25
+ else
26
+ false
27
+ end
28
28
  else
29
- false
29
+ "File: site/#{file}: No such file or directory."
30
30
  end
31
31
  end
32
32
 
33
33
  build
34
34
 
35
- tags = %w{content_for footer head include include_plugin include_theme include_theme_override scripts}
36
- tags.each { |tag| test("tag_tests/#{tag}.html") }
35
+ def test_tags(dir)
36
+ tags = %w{content_for footer head include include_plugin include_theme include_theme_override scripts}
37
+ tags.each { |file| test("tag_tests/#{file}.html", dir) }
38
+ end
39
+
40
+ def test_layouts(dir)
41
+ layouts = %w{local plugin_layout theme theme_override}
42
+ layouts.each { |file| test("layout_tests/#{file}.html", dir) }
43
+ end
44
+
45
+ def test_stylesheets(dir, concat_css=true)
46
+ if concat_css
47
+ stylesheets = %w{all-* print-*}
48
+ stylesheets.each { |file| test("stylesheets/#{file}.css", dir) }
49
+ else
50
+ local_stylesheets = %w{site test}
51
+ local_stylesheets.each { |file| test("stylesheets/#{file}.css", dir) }
52
+
53
+ plugin_stylesheets = %w{plugin-media-test plugin-test}
54
+ plugin_stylesheets.each { |file| test("awesome-sauce/stylesheets/#{file}.css", dir) }
55
+
56
+ theme_stylesheets = %w{theme-media-test theme-test theme-test2}
57
+ theme_stylesheets.each { |file| test("theme/stylesheets/#{file}.css", dir) }
58
+ end
59
+ end
60
+
61
+ test_tags('expected')
62
+ test_layouts('expected')
63
+ test_stylesheets('concat_css')
64
+
65
+ build '_concat_css_false.yml'
66
+ test_stylesheets('concat_css_false', false)
67
+
68
+ build '_sass_compact.yml'
69
+ test_stylesheets('sass_compact')
37
70
 
38
- layouts = %w{local plugin_layout theme theme_override}
39
- layouts.each { |tag| test("layout_tests/#{tag}.html") }
71
+ build '_sass_expanded.yml'
72
+ test_stylesheets('sass_expanded')
40
73
 
41
74
  abort if has_failed
42
75
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-ink
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.15
4
+ version: 1.0.0.alpha.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-10 00:00:00.000000000 Z
11
+ date: 2014-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry-debugger
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: A starting point for creating gem-based Jekyll themes and plugins
70
84
  email:
71
85
  - brandon@imathis.com
@@ -95,7 +109,7 @@ files:
95
109
  - lib/octopress-ink/jekyll/hooks.rb
96
110
  - lib/octopress-ink/plugin.rb
97
111
  - lib/octopress-ink/plugins.rb
98
- - lib/octopress-ink/plugins/sass.rb
112
+ - lib/octopress-ink/plugins/stylesheets.rb
99
113
  - lib/octopress-ink/tags.rb
100
114
  - lib/octopress-ink/tags/content_for.rb
101
115
  - lib/octopress-ink/tags/footer.rb
@@ -109,15 +123,24 @@ files:
109
123
  - lib/octopress-ink/version.rb
110
124
  - octopress-ink.gemspec
111
125
  - test/Gemfile
126
+ - test/_concat_css_false.yml
112
127
  - test/_config.yml
128
+ - test/_sass_compact.yml
129
+ - test/_sass_expanded.yml
130
+ - test/concat_css/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
131
+ - test/concat_css/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
132
+ - test/concat_css_false/awesome-sauce/stylesheets/plugin-media-test.css
133
+ - test/concat_css_false/awesome-sauce/stylesheets/plugin-test.css
134
+ - test/concat_css_false/stylesheets/site.css
135
+ - test/concat_css_false/stylesheets/test.css
136
+ - test/concat_css_false/theme/stylesheets/theme-media-test.css
137
+ - test/concat_css_false/theme/stylesheets/theme-test.css
138
+ - test/concat_css_false/theme/stylesheets/theme-test2.css
113
139
  - test/expected/index.html
114
- - test/expected/javascripts/d41d8cd98f00b204e9800998ecf8427e.js
115
140
  - test/expected/layout_tests/local.html
116
141
  - test/expected/layout_tests/plugin_layout.html
117
142
  - test/expected/layout_tests/theme.html
118
143
  - test/expected/layout_tests/theme_override.html
119
- - test/expected/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css
120
- - test/expected/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css
121
144
  - test/expected/tag_tests/content_for.html
122
145
  - test/expected/tag_tests/footer.html
123
146
  - test/expected/tag_tests/head.html
@@ -126,15 +149,17 @@ files:
126
149
  - test/expected/tag_tests/include_theme.html
127
150
  - test/expected/tag_tests/include_theme_override.html
128
151
  - test/expected/tag_tests/scripts.html
129
- - test/expected/theme/files/test.html
152
+ - test/sass_compact/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
153
+ - test/sass_compact/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
154
+ - test/sass_expanded/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
155
+ - test/sass_expanded/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
130
156
  - test/site/index.html
131
- - test/site/javascripts/d41d8cd98f00b204e9800998ecf8427e.js
132
157
  - test/site/layout_tests/local.html
133
158
  - test/site/layout_tests/plugin_layout.html
134
159
  - test/site/layout_tests/theme.html
135
160
  - test/site/layout_tests/theme_override.html
136
- - test/site/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css
137
- - test/site/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css
161
+ - test/site/stylesheets/all-5f4148b9fde2541e99deb55ebf3fe695.css
162
+ - test/site/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
138
163
  - test/site/tag_tests/content_for.html
139
164
  - test/site/tag_tests/footer.html
140
165
  - test/site/tag_tests/head.html
@@ -143,30 +168,31 @@ files:
143
168
  - test/site/tag_tests/include_theme.html
144
169
  - test/site/tag_tests/include_theme_override.html
145
170
  - test/site/tag_tests/scripts.html
146
- - test/site/theme/files/test.html
147
171
  - test/source/.gitignore
148
172
  - test/source/_custom/theme/includes/bar.html
149
173
  - test/source/_custom/theme/layouts/test.html
150
- - test/source/_custom/theme/stylesheets/_baz.sass
151
- - test/source/_custom/theme/stylesheets/site.css
174
+ - test/source/_custom/theme/stylesheets/_colors.sass
175
+ - test/source/_custom/theme/stylesheets/theme-test.css
152
176
  - test/source/_includes/foo.html
153
177
  - test/source/_layouts/default.html
154
178
  - test/source/_layouts/local.html
155
179
  - test/source/_plugins/awesome-sauce/includes/some-include.html
156
180
  - test/source/_plugins/awesome-sauce/layouts/test-layout.html
181
+ - test/source/_plugins/awesome-sauce/stylesheets/plugin-media-test.css
182
+ - test/source/_plugins/awesome-sauce/stylesheets/plugin-test.css
157
183
  - test/source/_plugins/bundler.rb
158
- - test/source/_plugins/theme/files/test.html
159
- - test/source/_plugins/theme/includes/bar.html
160
- - test/source/_plugins/theme/includes/foo.html
161
- - test/source/_plugins/theme/javascripts/bar.js
162
- - test/source/_plugins/theme/javascripts/foo.js
163
- - test/source/_plugins/theme/layouts/default.html
164
- - test/source/_plugins/theme/layouts/test.html
165
- - test/source/_plugins/theme/stylesheets/_baz.scss
166
- - test/source/_plugins/theme/stylesheets/bar.scss
167
- - test/source/_plugins/theme/stylesheets/foo.css
168
- - test/source/_plugins/theme/stylesheets/print.css
169
- - test/source/_plugins/theme/stylesheets/site.css
184
+ - test/source/_plugins/test-theme/files/test.html
185
+ - test/source/_plugins/test-theme/includes/bar.html
186
+ - test/source/_plugins/test-theme/includes/foo.html
187
+ - test/source/_plugins/test-theme/javascripts/bar.js
188
+ - test/source/_plugins/test-theme/javascripts/foo.js
189
+ - test/source/_plugins/test-theme/layouts/default.html
190
+ - test/source/_plugins/test-theme/layouts/test.html
191
+ - test/source/_plugins/test-theme/stylesheets/_colors.scss
192
+ - test/source/_plugins/test-theme/stylesheets/main.scss
193
+ - test/source/_plugins/test-theme/stylesheets/theme-media-test@print.css
194
+ - test/source/_plugins/test-theme/stylesheets/theme-test.css
195
+ - test/source/_plugins/test-theme/stylesheets/theme-test2.css
170
196
  - test/source/index.md
171
197
  - test/source/layout_tests/local.html
172
198
  - test/source/layout_tests/plugin_layout.html
@@ -174,6 +200,7 @@ files:
174
200
  - test/source/layout_tests/theme_override.html
175
201
  - test/source/stylesheets/_foo.scss
176
202
  - test/source/stylesheets/site.sass
203
+ - test/source/stylesheets/test.css
177
204
  - test/source/tag_tests/content_for.html
178
205
  - test/source/tag_tests/footer.html
179
206
  - test/source/tag_tests/head.html
@@ -209,15 +236,24 @@ specification_version: 4
209
236
  summary: A starting point for creating gem-based Jekyll themes and plugins
210
237
  test_files:
211
238
  - test/Gemfile
239
+ - test/_concat_css_false.yml
212
240
  - test/_config.yml
241
+ - test/_sass_compact.yml
242
+ - test/_sass_expanded.yml
243
+ - test/concat_css/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
244
+ - test/concat_css/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
245
+ - test/concat_css_false/awesome-sauce/stylesheets/plugin-media-test.css
246
+ - test/concat_css_false/awesome-sauce/stylesheets/plugin-test.css
247
+ - test/concat_css_false/stylesheets/site.css
248
+ - test/concat_css_false/stylesheets/test.css
249
+ - test/concat_css_false/theme/stylesheets/theme-media-test.css
250
+ - test/concat_css_false/theme/stylesheets/theme-test.css
251
+ - test/concat_css_false/theme/stylesheets/theme-test2.css
213
252
  - test/expected/index.html
214
- - test/expected/javascripts/d41d8cd98f00b204e9800998ecf8427e.js
215
253
  - test/expected/layout_tests/local.html
216
254
  - test/expected/layout_tests/plugin_layout.html
217
255
  - test/expected/layout_tests/theme.html
218
256
  - test/expected/layout_tests/theme_override.html
219
- - test/expected/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css
220
- - test/expected/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css
221
257
  - test/expected/tag_tests/content_for.html
222
258
  - test/expected/tag_tests/footer.html
223
259
  - test/expected/tag_tests/head.html
@@ -226,15 +262,17 @@ test_files:
226
262
  - test/expected/tag_tests/include_theme.html
227
263
  - test/expected/tag_tests/include_theme_override.html
228
264
  - test/expected/tag_tests/scripts.html
229
- - test/expected/theme/files/test.html
265
+ - test/sass_compact/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
266
+ - test/sass_compact/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
267
+ - test/sass_expanded/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
268
+ - test/sass_expanded/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
230
269
  - test/site/index.html
231
- - test/site/javascripts/d41d8cd98f00b204e9800998ecf8427e.js
232
270
  - test/site/layout_tests/local.html
233
271
  - test/site/layout_tests/plugin_layout.html
234
272
  - test/site/layout_tests/theme.html
235
273
  - test/site/layout_tests/theme_override.html
236
- - test/site/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css
237
- - test/site/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css
274
+ - test/site/stylesheets/all-5f4148b9fde2541e99deb55ebf3fe695.css
275
+ - test/site/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
238
276
  - test/site/tag_tests/content_for.html
239
277
  - test/site/tag_tests/footer.html
240
278
  - test/site/tag_tests/head.html
@@ -243,30 +281,31 @@ test_files:
243
281
  - test/site/tag_tests/include_theme.html
244
282
  - test/site/tag_tests/include_theme_override.html
245
283
  - test/site/tag_tests/scripts.html
246
- - test/site/theme/files/test.html
247
284
  - test/source/.gitignore
248
285
  - test/source/_custom/theme/includes/bar.html
249
286
  - test/source/_custom/theme/layouts/test.html
250
- - test/source/_custom/theme/stylesheets/_baz.sass
251
- - test/source/_custom/theme/stylesheets/site.css
287
+ - test/source/_custom/theme/stylesheets/_colors.sass
288
+ - test/source/_custom/theme/stylesheets/theme-test.css
252
289
  - test/source/_includes/foo.html
253
290
  - test/source/_layouts/default.html
254
291
  - test/source/_layouts/local.html
255
292
  - test/source/_plugins/awesome-sauce/includes/some-include.html
256
293
  - test/source/_plugins/awesome-sauce/layouts/test-layout.html
294
+ - test/source/_plugins/awesome-sauce/stylesheets/plugin-media-test.css
295
+ - test/source/_plugins/awesome-sauce/stylesheets/plugin-test.css
257
296
  - test/source/_plugins/bundler.rb
258
- - test/source/_plugins/theme/files/test.html
259
- - test/source/_plugins/theme/includes/bar.html
260
- - test/source/_plugins/theme/includes/foo.html
261
- - test/source/_plugins/theme/javascripts/bar.js
262
- - test/source/_plugins/theme/javascripts/foo.js
263
- - test/source/_plugins/theme/layouts/default.html
264
- - test/source/_plugins/theme/layouts/test.html
265
- - test/source/_plugins/theme/stylesheets/_baz.scss
266
- - test/source/_plugins/theme/stylesheets/bar.scss
267
- - test/source/_plugins/theme/stylesheets/foo.css
268
- - test/source/_plugins/theme/stylesheets/print.css
269
- - test/source/_plugins/theme/stylesheets/site.css
297
+ - test/source/_plugins/test-theme/files/test.html
298
+ - test/source/_plugins/test-theme/includes/bar.html
299
+ - test/source/_plugins/test-theme/includes/foo.html
300
+ - test/source/_plugins/test-theme/javascripts/bar.js
301
+ - test/source/_plugins/test-theme/javascripts/foo.js
302
+ - test/source/_plugins/test-theme/layouts/default.html
303
+ - test/source/_plugins/test-theme/layouts/test.html
304
+ - test/source/_plugins/test-theme/stylesheets/_colors.scss
305
+ - test/source/_plugins/test-theme/stylesheets/main.scss
306
+ - test/source/_plugins/test-theme/stylesheets/theme-media-test@print.css
307
+ - test/source/_plugins/test-theme/stylesheets/theme-test.css
308
+ - test/source/_plugins/test-theme/stylesheets/theme-test2.css
270
309
  - test/source/index.md
271
310
  - test/source/layout_tests/local.html
272
311
  - test/source/layout_tests/plugin_layout.html
@@ -274,6 +313,7 @@ test_files:
274
313
  - test/source/layout_tests/theme_override.html
275
314
  - test/source/stylesheets/_foo.scss
276
315
  - test/source/stylesheets/site.sass
316
+ - test/source/stylesheets/test.css
277
317
  - test/source/tag_tests/content_for.html
278
318
  - test/source/tag_tests/footer.html
279
319
  - test/source/tag_tests/head.html
@@ -1,20 +0,0 @@
1
- # The sass assets for this plugin are populated at runtime by the add_static_files method of
2
- # the Plugins module.
3
- #
4
- module Octopress
5
- class SassPlugin < Octopress::Plugin
6
- def add_files(files)
7
- files = [files] unless files.is_a? Array
8
- files.each do |file|
9
- # accept ['file', 'media_type']
10
- if file.is_a? Array
11
- add_sass file.first, file.last
12
- # accept 'file'
13
- else
14
- add_sass file
15
- end
16
- end
17
- end
18
- end
19
- end
20
-
@@ -1,2 +0,0 @@
1
- console.log('omg')
2
- console.log('bar')
@@ -1 +0,0 @@
1
- body{color:black}div{display:block}body{background:#fff}body{display:table}body{background:#aaa111}div{display:table}
@@ -1 +0,0 @@
1
- .omg{display:none}
@@ -1,2 +0,0 @@
1
- console.log('omg')
2
- console.log('bar')
@@ -1 +0,0 @@
1
- body{color:black}div{display:block}body{background:#fff}body{display:table}body{background:#aaa111}div{display:table}
@@ -1 +0,0 @@
1
- .omg{display:none}
@@ -1 +0,0 @@
1
- <strong>test</strong>
@@ -1 +0,0 @@
1
- $bg: white
@@ -1 +0,0 @@
1
- body { color: black; }
@@ -1 +0,0 @@
1
- <strong>test</strong>
@@ -1 +0,0 @@
1
- $bg: green;
@@ -1,4 +0,0 @@
1
- @import 'baz';
2
- body {
3
- background: $bg;
4
- }
@@ -1 +0,0 @@
1
- div { display: block; }
@@ -1 +0,0 @@
1
- .omg { display: none; }