bobkit 0.1.9 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edef2cac373a1bb660b5039319b60000f78390ee4d1b1f247d0a53bd624f77db
4
- data.tar.gz: 30c0d9c908ef88fc23153cfeae31d1dbd1bf746a9cfd1bd3d4072511c75ce2e3
3
+ metadata.gz: 99f29c755fc05009338bf2170974c691a2873a7eceb01f1e5ac4b2a9f3278ed1
4
+ data.tar.gz: f7704fe340fdf20923e6402ee654ccaa2a2f319454be2de5e33c167fc9c7b51e
5
5
  SHA512:
6
- metadata.gz: 6276ac5b02b23f913988e3fca8d49700d13afd0678354ef27b5142ca5ef4b72608d3ae7d8843523ca4905c5d60f36ebf0073c5e9e1d74c0950c38e8999414c31
7
- data.tar.gz: 94765c19081117f7a95f9ce7c7906548c0b318d722f00faba87abfbcec35a976861d8608105de115959dea3b2cfbe81688c2790767c50fc929c8f557672c8620
6
+ metadata.gz: ae4612bec44c476c9694959c824c77718ec184b7666c37d18bec2b013077407a70c64c9491895b66b9bdc192d77eef00cfeb4616a10a4944041c68fa410c2b7b
7
+ data.tar.gz: 6736053dec44b7555edf2f8b91eb8f5697b5eaefb4ea8b1d552b0469b2d3e37a90ac7ef21a90b36cec578da7a8ad8410d243812486fe1cdb1ca5def7ca7c4d30
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
- Bobkit - Site Generation Toolkit
2
- ==================================================
1
+ # Bobkit - Site Generation Toolkit
3
2
 
4
3
  [![Gem Version](https://badge.fury.io/rb/bobkit.svg)](https://badge.fury.io/rb/bobkit)
5
- [![Build Status](https://travis-ci.com/DannyBen/bobkit.svg?branch=master)](https://travis-ci.com/DannyBen/bobkit)
4
+ [![Build Status](https://github.com/DannyBen/bobkit/workflows/Test/badge.svg)](https://github.com/DannyBen/bobkit/actions?query=workflow%3ATest)
6
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/64c20ebaaf8ecff0948d/maintainability)](https://codeclimate.com/github/DannyBen/bobkit/maintainability)
7
6
 
8
7
  ---
@@ -29,8 +28,7 @@ The design intentions were to:
29
28
 
30
29
 
31
30
 
32
- Install
33
- --------------------------------------------------
31
+ ## Install
34
32
 
35
33
  `gem install bobkit`
36
34
 
@@ -40,8 +38,7 @@ Or with Bundler:
40
38
 
41
39
 
42
40
 
43
- Usage
44
- --------------------------------------------------
41
+ ## Usage
45
42
 
46
43
  The basic usage pattern is this:
47
44
 
@@ -92,8 +89,7 @@ bob.render ...
92
89
  bob.compile_css ...
93
90
  ```
94
91
 
95
- Reference
96
- --------------------------------------------------
92
+ ## Reference
97
93
 
98
94
  ### Setting folder locations and options
99
95
 
@@ -265,9 +261,11 @@ use it.
265
261
  ```ruby
266
262
  include Bobkit::Watcher
267
263
 
268
- watch do |filename, event|
269
- puts "#{event}: #{filename}"
270
- generate
264
+ watch do |changes|
265
+ changes do |filename, event|
266
+ puts "#{event}: #{filename}"
267
+ generate
268
+ end
271
269
  end
272
270
 
273
271
  def generate
@@ -280,11 +278,5 @@ The watch command is just like
280
278
  with the exception that the array of paths to watch is optional. If none
281
279
  provided, we will watch all the input folders.
282
280
 
283
- Todo
284
- --------------------------------------------------
285
-
286
- - [ ] YAML loader (data_folder?)
287
- - [ ] CSV Loader (data_folder?)
288
-
289
281
 
290
282
  [1]: https://github.com/DannyBen/bobkit/tree/master/examples
@@ -1,15 +1,20 @@
1
1
  module Bobkit
2
2
  module SassBridge
3
3
  include FileHelpers
4
- include SassOptions
5
-
6
- def compile_css(file, options={})
7
- @file = "#{styles_folder}/#{file}.scss"
8
- extended_options = scss_options.merge({ filename: @file })
9
- content = Sass::Engine.new(File.read(@file), extended_options).render
10
- output = options[:output]
11
- create_file "#{css_output_folder}/#{output}.css", content if output
12
- content
4
+
5
+ def compile_css(file, output: nil, source_map: true)
6
+ file = "#{styles_folder}/#{file}.scss"
7
+ sass = Sasstool::Renderer.new file
8
+
9
+ if output
10
+ create_file "#{css_output_folder}/#{output}.css", sass.render
11
+
12
+ if source_map
13
+ create_file "#{css_output_folder}/#{output}.css.map", sass.source_map
14
+ end
15
+ end
16
+
17
+ sass.render
13
18
  end
14
19
  end
15
20
  end
data/lib/bobkit/tasks.rb CHANGED
@@ -8,7 +8,6 @@ module Bobkit
8
8
  include I18nBridge
9
9
  include MarkdownBridge
10
10
  include SlimOptions
11
- include SassOptions
12
11
  include ScopeOptions
13
12
  include Assets
14
13
  end
@@ -1,3 +1,3 @@
1
1
  module Bobkit
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/bobkit.rb CHANGED
@@ -1,27 +1,27 @@
1
- require 'i18n'
2
- require 'fileutils'
3
- require 'sass'
4
- require 'sass-globbing'
5
- require 'slim'
6
- require 'coffee_script'
7
- require 'filewatcher'
8
- require 'rdiscount'
9
-
10
- require 'bobkit/options_base'
11
- require 'bobkit/location_options'
12
- require 'bobkit/file_helpers'
13
- require 'bobkit/i18n_mixin'
14
- require 'bobkit/i18n_bridge'
15
- require 'bobkit/scope_options'
16
- require 'bobkit/sass_options'
17
- require 'bobkit/sass_bridge'
18
- require 'bobkit/slim_options'
19
- require 'bobkit/slim_bridge'
20
- require 'bobkit/coffee_bridge'
21
- require 'bobkit/markdown_bridge'
22
- require 'bobkit/assets'
23
- require 'bobkit/watcher'
24
-
25
- require 'bobkit/scope'
26
- require 'bobkit/tasks'
27
- require 'bobkit/bob'
1
+ require 'singleton'
2
+
3
+ require 'i18n'
4
+ require 'fileutils'
5
+ require 'sasstool'
6
+ require 'slim'
7
+ require 'coffee_script'
8
+ require 'filewatcher'
9
+ require 'rdiscount'
10
+
11
+ require 'bobkit/options_base'
12
+ require 'bobkit/location_options'
13
+ require 'bobkit/file_helpers'
14
+ require 'bobkit/i18n_mixin'
15
+ require 'bobkit/i18n_bridge'
16
+ require 'bobkit/scope_options'
17
+ require 'bobkit/sass_bridge'
18
+ require 'bobkit/slim_options'
19
+ require 'bobkit/slim_bridge'
20
+ require 'bobkit/coffee_bridge'
21
+ require 'bobkit/markdown_bridge'
22
+ require 'bobkit/assets'
23
+ require 'bobkit/watcher'
24
+
25
+ require 'bobkit/scope'
26
+ require 'bobkit/tasks'
27
+ require 'bobkit/bob'
metadata CHANGED
@@ -1,57 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bobkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-26 00:00:00.000000000 Z
11
+ date: 2022-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: slim
14
+ name: sasstool
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '4.0'
27
- - !ruby/object:Gem::Dependency
28
- name: sass
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.7'
19
+ version: '0.2'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '3.7'
26
+ version: '0.2'
41
27
  - !ruby/object:Gem::Dependency
42
- name: sass-globbing
28
+ name: slim
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '1.1'
33
+ version: '4.0'
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '1.1'
40
+ version: '4.0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: coffee-script
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,28 +72,28 @@ dependencies:
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '1.1'
75
+ version: '2.0'
90
76
  type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '1.1'
82
+ version: '2.0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: mini_racer
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: '0.2'
89
+ version: '0.6'
104
90
  type: :runtime
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: '0.2'
96
+ version: '0.6'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: rdiscount
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +126,6 @@ files:
140
126
  - lib/bobkit/markdown_bridge.rb
141
127
  - lib/bobkit/options_base.rb
142
128
  - lib/bobkit/sass_bridge.rb
143
- - lib/bobkit/sass_options.rb
144
129
  - lib/bobkit/scope.rb
145
130
  - lib/bobkit/scope_options.rb
146
131
  - lib/bobkit/slim_bridge.rb
@@ -160,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
145
  requirements:
161
146
  - - ">="
162
147
  - !ruby/object:Gem::Version
163
- version: 2.0.0
148
+ version: 2.6.0
164
149
  required_rubygems_version: !ruby/object:Gem::Requirement
165
150
  requirements:
166
151
  - - ">="
167
152
  - !ruby/object:Gem::Version
168
153
  version: '0'
169
154
  requirements: []
170
- rubygems_version: 3.0.3
155
+ rubygems_version: 3.3.14
171
156
  signing_key:
172
157
  specification_version: 4
173
158
  summary: Site Generation Toolkit
@@ -1,13 +0,0 @@
1
- module Bobkit
2
- module SassOptions
3
- def scss_options(options=nil)
4
- setopt :scss_options, options, scss_defaults
5
- end
6
- alias_method :sass_options, :scss_options
7
-
8
- def scss_defaults
9
- { cache: true, syntax: :scss, style: :nested,
10
- load_paths: [styles_folder] }
11
- end
12
- end
13
- end