web_blocks 2.0.2.dev → 2.0.3.dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +8 -0
- data/README.md +21 -9
- data/lib/web_blocks/manager/builder/js.rb +9 -5
- data/lib/web_blocks/manager/builder/scss.rb +9 -5
- data/lib/web_blocks/strategy/optimize/css.rb +16 -2
- data/lib/web_blocks/strategy/optimize/js.rb +17 -2
- data/lib/web_blocks/thor/base/initialize.rb +2 -2
- data/lib/web_blocks/thor/base/prepare_blocks.rb +2 -2
- data/lib/web_blocks/thor/inspect/blocks.rb +89 -1
- data/lib/web_blocks/thor/inspect.rb +1 -1
- data/lib/web_blocks/thor/partial/compile.rb +12 -0
- data/lib/web_blocks/thor/partial/link.rb +24 -0
- data/lib/web_blocks/thor/watch/all.rb +18 -1
- data/lib/web_blocks/version.rb +1 -1
- data/web_blocks.gemspec +1 -0
- metadata +46 -39
- data/lib/web_blocks/thor/inspect/blocks/attribute_printer.rb +0 -48
- data/lib/web_blocks/thor/inspect/blocks/block_printer.rb +0 -43
- data/lib/web_blocks/thor/inspect/blocks/printer.rb +0 -24
- data/lib/web_blocks/thor/partial/compile/scss.rb +0 -24
- data/lib/web_blocks/thor/partial/link/js.rb +0 -23
- data/lib/web_blocks/thor/partial/link/scss.rb +0 -23
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NzcyNTM0NzQ0NTAxMTY5OWM1ZjE3NTVmOTBhM2QxZTc4NmQ0ZjZjZg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a720c3970de5dccb5e76fb6c07d8a0fe8ff205ae
|
4
|
+
data.tar.gz: 4d8f112c2127d49241a9dffea570e1bb9ba03dfa
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZGY1ZmMxMzMzOWVkMzkxZTIwY2VmZGUzZTA4ZTIzN2JlOThhZjNhYWFjZmU1
|
11
|
-
OTFlYTZmYTBhOGE5NTMzMzdjZWRlMzczMGQ0M2U4YzgxMDRhZTI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZTgzZTA1YWFiODMzNmUxZDQwYzVlZDM2NGI3NTllNjI1ZmU3ZGQ0NDgwOTA2
|
14
|
-
NWUzOWY3NTNjYmJmMTgyMWM1ZmE2MzYwYWNjNGMxZGQ0OTA1NTI3YjVkZDc3
|
15
|
-
MTE5YTljNGViMmUwYWVmNzA2YjRlODY3ZDg4M2MwZDBiYzY1Yjc=
|
6
|
+
metadata.gz: f52b8e0ef63e65beb30142d9902f0dc0a4d8f0f42ba5b257a1fdd62af0793c1c873864f0a74c9ad69f87b4dc3f01a4bf1bd1d48355b8eb129932e34cd218a483
|
7
|
+
data.tar.gz: 7d775304a4e24b3c4dcbe2db69a7d40910faba97104ea5d01019330729500f6e8359d1ca7c3983420f15b4750779071eae26f14ec55ca527c8157ba803c3692f
|
data/.travis.yml
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
+
- "2.1.0"
|
3
4
|
- "2.0.0"
|
4
5
|
- "1.9.3"
|
5
6
|
before_install:
|
6
7
|
- gem update --system
|
7
8
|
- gem --version
|
8
9
|
script: bundle exec rake test
|
10
|
+
notifications:
|
11
|
+
webhooks:
|
12
|
+
urls:
|
13
|
+
- https://webhooks.gitter.im/e/f8a813b3063636aa18f1
|
14
|
+
on_success: change # options: [always|never|change] default: always
|
15
|
+
on_failure: always # options: [always|never|change] default: always
|
16
|
+
on_start: false # default: false
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ WebBlocks is managed by [Eric Bollens](https://github.com/ebollens) as part of a
|
|
18
18
|
|
19
19
|
WebBlocks is a product of its contributors, including those who have contributed code, submitted bugs or even simply participated in the dialogue.
|
20
20
|
|
21
|
-
WebBlocks is built on top of a number of outstanding open source platforms and packages including [Ruby](http://www.ruby-lang.org/), [RubyGems](http://rubygems.org/) [Bundler](http://gembundler.com/), [Node.js](http://nodejs.org/), [npm](https://npmjs.org/), [Saas](http://sass-lang.com/), [Compass](http://compass-style.org/), [Thor](http://whatisthor.com/), [Rake](http://rake.rubyforge.org/), [File System State Monitor](https://github.com/ttilley/fssm), [sass-css-importer](https://github.com/chriseppstein/sass-css-importer), [ruby-bower](https://github.com/kaeff/ruby-bower), [fork](https://github.com/apeiros/fork) and [extend_method](https://github.com/ebollens/ruby-extend_method). A sincere thanks is extended to the authors of all these fine tools.
|
21
|
+
WebBlocks is built on top of a number of outstanding open source platforms and packages including [Ruby](http://www.ruby-lang.org/), [RubyGems](http://rubygems.org/), [Bundler](http://gembundler.com/), [Node.js](http://nodejs.org/), [npm](https://npmjs.org/), [Saas](http://sass-lang.com/), [Compass](http://compass-style.org/), [Thor](http://whatisthor.com/), [Rake](http://rake.rubyforge.org/), [File System State Monitor](https://github.com/ttilley/fssm), [sass-css-importer](https://github.com/chriseppstein/sass-css-importer), [ruby-bower](https://github.com/kaeff/ruby-bower), [fork](https://github.com/apeiros/fork) and [extend_method](https://github.com/ebollens/ruby-extend_method). A sincere thanks is extended to the authors of all these fine tools.
|
22
22
|
|
23
23
|
## Installation
|
24
24
|
|
@@ -48,13 +48,25 @@ bundle
|
|
48
48
|
|
49
49
|
#### As Gem
|
50
50
|
|
51
|
-
|
51
|
+
To install the latest dev snapshot from RubyGems:
|
52
52
|
|
53
53
|
```
|
54
|
-
gem
|
54
|
+
gem install web_blocks --pre
|
55
55
|
```
|
56
56
|
|
57
|
-
|
57
|
+
Or add it to your `Gemfile` (creating it if it doesn't exist):
|
58
|
+
|
59
|
+
```
|
60
|
+
gem 'web_blocks'
|
61
|
+
```
|
62
|
+
|
63
|
+
Alternatively, to get the bleeding edge, you may specify the Git repository for sources:
|
64
|
+
|
65
|
+
```
|
66
|
+
gem 'web_blocks', :git => 'https://github.com/WebBlocks/WebBlocks.git'
|
67
|
+
```
|
68
|
+
|
69
|
+
Once added to your `Gemfile`, run Bundler to install it:
|
58
70
|
|
59
71
|
```
|
60
72
|
bundle
|
@@ -91,7 +103,7 @@ Alternatively, this can be done by defining a `package.json`:
|
|
91
103
|
```json
|
92
104
|
{
|
93
105
|
"dependencies": {
|
94
|
-
"bower":">=1.
|
106
|
+
"bower":">=1.3.8"
|
95
107
|
}
|
96
108
|
}
|
97
109
|
```
|
@@ -269,7 +281,7 @@ blocks inspect dependency_order --type=scss
|
|
269
281
|
|
270
282
|
### Defining Components
|
271
283
|
|
272
|
-
Blocks are the fundamental constituents of WebBlocks, defined as bower components. Consequently, `bower.json` must define
|
284
|
+
Blocks are the fundamental constituents of WebBlocks, defined as bower components. Consequently, `bower.json` must define a name and version for the build you're going to create. The name is important in that it defines the block that WebBlocks will load by default when compiling (although others may be included as dependencies or explicitly - more on this later):
|
273
285
|
|
274
286
|
```json
|
275
287
|
{
|
@@ -312,7 +324,7 @@ $ blocks inspect dependency_order
|
|
312
324
|
/Users/ebollens/Sites/test/bower_components/WebBlocks-visibility/src/media-query/_hide.scss
|
313
325
|
```
|
314
326
|
|
315
|
-
WebBlocks has linked all WebBlocks-visibility constituents, as well as its
|
327
|
+
WebBlocks has linked all WebBlocks-visibility constituents, as well as its requisites - namely WebBlocks-breakpoint (which we did not specify but was rather specified in the WebBlocks-visibility [Blockfile.rb](https://github.com/WebBlocks/block-visibility/blob/master/Blockfile.rb) and [bower.json](https://github.com/WebBlocks/block-visibility/blob/master/bower.json) files).
|
316
328
|
|
317
329
|
You can build it as:
|
318
330
|
|
@@ -355,7 +367,7 @@ framework (Framework)
|
|
355
367
|
_variables.scss (ScssFile)
|
356
368
|
```
|
357
369
|
|
358
|
-
Anything designated as a block may be specified as an `include`. Returning the `Blockfile.rb`, one could tighten the block inclusion scope
|
370
|
+
Anything designated as a block may be specified as an `include`. Returning the `Blockfile.rb`, one could tighten the block inclusion scope by replacing its current content with something like:
|
359
371
|
|
360
372
|
```ruby
|
361
373
|
include 'WebBlocks-visibility', 'accessible'
|
@@ -646,4 +658,4 @@ $ blocks inspect dependency_order
|
|
646
658
|
|
647
659
|
### Learn More
|
648
660
|
|
649
|
-
See the `demo` folder for a example setup.
|
661
|
+
See the `demo` folder for a example setup.
|
@@ -39,11 +39,15 @@ module WebBlocks
|
|
39
39
|
FileUtils.mkdir_p js_build_path
|
40
40
|
|
41
41
|
[link_strategy, optimize_strategy].each do |strategy|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
begin
|
43
|
+
log.info do
|
44
|
+
source_path = strategy.product_path
|
45
|
+
product_path = js_build_path + source_path.basename
|
46
|
+
FileUtils.copy source_path, product_path
|
47
|
+
"Saved JS build #{product_path}"
|
48
|
+
end
|
49
|
+
rescue Errno::ENOENT => e
|
50
|
+
# skip because file does not exist
|
47
51
|
end
|
48
52
|
end
|
49
53
|
|
@@ -42,11 +42,15 @@ module WebBlocks
|
|
42
42
|
FileUtils.mkdir_p css_build_path
|
43
43
|
|
44
44
|
[compile_strategy, optimize_strategy].each do |strategy|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
begin
|
46
|
+
log.info do
|
47
|
+
source_path = strategy.product_path
|
48
|
+
product_path = css_build_path + source_path.basename
|
49
|
+
FileUtils.copy source_path, product_path
|
50
|
+
"Saved CSS build #{product_path}"
|
51
|
+
end
|
52
|
+
rescue Errno::ENOENT => e
|
53
|
+
# skip because file does not exist
|
50
54
|
end
|
51
55
|
end
|
52
56
|
|
@@ -22,8 +22,22 @@ module WebBlocks
|
|
22
22
|
|
23
23
|
File.open task.base_path + product_path, 'w' do |product|
|
24
24
|
File.open task.base_path + source_path, 'r' do |source|
|
25
|
-
|
26
|
-
|
25
|
+
if source.size > 0
|
26
|
+
begin
|
27
|
+
compressor = YUI::CssCompressor.new
|
28
|
+
silently do
|
29
|
+
product.write compressor.compress source
|
30
|
+
end
|
31
|
+
rescue YUI::Compressor::RuntimeError => e
|
32
|
+
log.warn { "YUI compressor returned error -- skipping" }
|
33
|
+
FileUtils.rm task.base_path + product_path
|
34
|
+
rescue => e
|
35
|
+
log.warn { "Unexpected error encountered -- skipping\n#{e}" }
|
36
|
+
FileUtils.rm task.base_path + product_path
|
37
|
+
end
|
38
|
+
else
|
39
|
+
log.warn { "No CSS content -- skipping" }
|
40
|
+
end
|
27
41
|
end
|
28
42
|
end
|
29
43
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'facets/kernel/silence'
|
1
2
|
require 'web_blocks/strategy/optimize/base'
|
2
3
|
require 'yui/compressor'
|
3
4
|
|
@@ -22,8 +23,22 @@ module WebBlocks
|
|
22
23
|
|
23
24
|
File.open task.base_path + product_path, 'w' do |product|
|
24
25
|
File.open task.base_path + source_path, 'r' do |source|
|
25
|
-
|
26
|
-
|
26
|
+
if source.size > 0
|
27
|
+
begin
|
28
|
+
compressor = YUI::JavaScriptCompressor.new
|
29
|
+
silently do
|
30
|
+
product.write compressor.compress source
|
31
|
+
end
|
32
|
+
rescue YUI::Compressor::RuntimeError => e
|
33
|
+
log.warn { "YUI compressor returned error -- skipping" }
|
34
|
+
FileUtils.rm task.base_path + product_path
|
35
|
+
rescue => e
|
36
|
+
log.warn { "Unexpected error encountered -- skipping\n#{e}" }
|
37
|
+
FileUtils.rm task.base_path + product_path
|
38
|
+
end
|
39
|
+
else
|
40
|
+
log.warn { "No JS content -- skipping" }
|
41
|
+
end
|
27
42
|
end
|
28
43
|
end
|
29
44
|
|
@@ -49,7 +49,7 @@ module WebBlocks
|
|
49
49
|
You are using a pre-release DEVELOPMENT SNAPSHOT of WebBlocks.
|
50
50
|
This software should not be considered stable, and users are asked
|
51
51
|
to be mindful of the fact that there may be significant changes to
|
52
|
-
the APIs
|
52
|
+
the APIs and internals before release.
|
53
53
|
|
54
54
|
= = = = = = = = = = = = W A R N I N G = = = = = = = = = = = = = = =\n\n"
|
55
55
|
end
|
@@ -92,7 +92,7 @@ the APIs ad internals before release.
|
|
92
92
|
end
|
93
93
|
|
94
94
|
if path.to_s == '/'
|
95
|
-
log.fatal('INIT') { 'Workspace could not be resolved' }
|
95
|
+
log.fatal('INIT') { 'Workspace could not be resolved -- could not find bower.json' }
|
96
96
|
exit 1
|
97
97
|
end
|
98
98
|
|
@@ -41,9 +41,9 @@ module WebBlocks
|
|
41
41
|
clean_bower_registry! log
|
42
42
|
end
|
43
43
|
|
44
|
-
rescue
|
44
|
+
rescue ExecJS::ProgramError => e
|
45
45
|
|
46
|
-
if e.message.match "Cannot find module 'bower'"
|
46
|
+
if e.message.match "Cannot find module 'bower'" or e.message.match "Cannot read property 'cache'"
|
47
47
|
log.fatal { 'Bower must be installed -- try `npm install bower\'' }
|
48
48
|
exit 1
|
49
49
|
else
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'web_blocks/thor/inspect'
|
2
|
-
require 'web_blocks/thor/inspect/blocks/block_printer'
|
3
2
|
|
4
3
|
module WebBlocks
|
5
4
|
module Thor
|
@@ -22,6 +21,95 @@ module WebBlocks
|
|
22
21
|
|
23
22
|
end
|
24
23
|
|
24
|
+
no_commands do
|
25
|
+
module Blocks
|
26
|
+
|
27
|
+
class Printer
|
28
|
+
|
29
|
+
def initialize options
|
30
|
+
@options = options.clone
|
31
|
+
@options[:depth] = 0 unless @options.has_key?(:depth)
|
32
|
+
@options[:depth] = @options[:depth] + 1
|
33
|
+
@shell = ::WebBlocks::Thor::Inspect::Shell::Color.new
|
34
|
+
end
|
35
|
+
|
36
|
+
def say(message = '', color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
|
37
|
+
@shell.say Array.new(@options[:depth]).join(' ') + message, color, force_new_line
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
class AttributePrinter < Printer
|
43
|
+
|
44
|
+
def initialize key, value, options
|
45
|
+
super options
|
46
|
+
@value = value
|
47
|
+
@key_string = parse_key(key)
|
48
|
+
@value_string = parse_value(value)
|
49
|
+
end
|
50
|
+
|
51
|
+
def parse_key key
|
52
|
+
":#{key}"
|
53
|
+
end
|
54
|
+
|
55
|
+
def parse_value value
|
56
|
+
if @value.is_a?(::Array) or @value.is_a?(::Hash)
|
57
|
+
value.size > 0 ? value : nil
|
58
|
+
elsif value.is_a?(::String)
|
59
|
+
"\"#{value}\""
|
60
|
+
elsif value.is_a?(::TrueClass)
|
61
|
+
"true"
|
62
|
+
elsif value.is_a?(::FalseClass)
|
63
|
+
"false"
|
64
|
+
else
|
65
|
+
nil
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def color
|
70
|
+
@value ? [:green] : [:red]
|
71
|
+
end
|
72
|
+
|
73
|
+
def print!
|
74
|
+
say("#{@key_string} = #{@value_string}", color) if @value_string
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
class BlockPrinter < Printer
|
80
|
+
|
81
|
+
def initialize block, options
|
82
|
+
super options
|
83
|
+
@block = block
|
84
|
+
end
|
85
|
+
|
86
|
+
def print_name!
|
87
|
+
say "#{@block.name} (#{@block.class.name.split('::')[-1]})", (@block.respond_to?(:children) ? :bold : [])
|
88
|
+
end
|
89
|
+
|
90
|
+
def print_attributes!
|
91
|
+
@block.attributes.each do |key, value|
|
92
|
+
AttributePrinter.new(key, value, @options).print!
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def print_children!
|
97
|
+
@block.children.each do |_, child|
|
98
|
+
self.class.new(child, @options).print!
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def print!
|
103
|
+
print_name!
|
104
|
+
print_attributes! if @options[:attributes]
|
105
|
+
print_children! if @block.respond_to? :children
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
25
113
|
end
|
26
114
|
end
|
27
115
|
end
|
@@ -1,10 +1,22 @@
|
|
1
1
|
require 'web_blocks/thor/base'
|
2
|
+
require 'web_blocks/strategy/compile/scss'
|
2
3
|
|
3
4
|
module WebBlocks
|
4
5
|
module Thor
|
5
6
|
module Partial
|
6
7
|
class Compile < Base
|
7
8
|
|
9
|
+
description = "Compile linked SCSS files"
|
10
|
+
desc "scss", description
|
11
|
+
long_desc description
|
12
|
+
|
13
|
+
def scss
|
14
|
+
|
15
|
+
prepare_blocks!
|
16
|
+
::WebBlocks::Strategy::Compile::Scss.new(self).execute!
|
17
|
+
|
18
|
+
end
|
19
|
+
|
8
20
|
end
|
9
21
|
end
|
10
22
|
end
|
@@ -1,10 +1,34 @@
|
|
1
1
|
require 'web_blocks/thor/base'
|
2
|
+
require 'web_blocks/strategy/link/js'
|
3
|
+
require 'web_blocks/strategy/link/scss'
|
2
4
|
|
3
5
|
module WebBlocks
|
4
6
|
module Thor
|
5
7
|
module Partial
|
6
8
|
class Link < Base
|
7
9
|
|
10
|
+
description = "Construct linked construct of JS files based on dependencies"
|
11
|
+
desc "js", description
|
12
|
+
long_desc description
|
13
|
+
|
14
|
+
def js
|
15
|
+
|
16
|
+
prepare_blocks!
|
17
|
+
::WebBlocks::Strategy::Link::Js.new(self).execute!
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
description = "Construct linked construct of SCSS files based on dependencies"
|
22
|
+
desc "scss", description
|
23
|
+
long_desc description
|
24
|
+
|
25
|
+
def scss
|
26
|
+
|
27
|
+
prepare_blocks!
|
28
|
+
::WebBlocks::Strategy::Link::Scss.new(self).execute!
|
29
|
+
|
30
|
+
end
|
31
|
+
|
8
32
|
end
|
9
33
|
end
|
10
34
|
end
|
@@ -10,6 +10,7 @@ module WebBlocks
|
|
10
10
|
description = "Watch and rebuild all assets"
|
11
11
|
desc "all", description
|
12
12
|
long_desc description
|
13
|
+
method_option :build, :type => :boolean, :default => false, :desc => 'Build on starting watch'
|
13
14
|
|
14
15
|
def all
|
15
16
|
|
@@ -46,12 +47,28 @@ module WebBlocks
|
|
46
47
|
|
47
48
|
rescue ::TSort::Cyclic => e
|
48
49
|
|
49
|
-
log.error
|
50
|
+
log.error("Watch"){ "Build failed -- Cyclical dependencies detected" }
|
51
|
+
|
52
|
+
rescue ::Sass::SyntaxError => e
|
53
|
+
|
54
|
+
log.error("Watch"){ "Build failed -- Sass syntax error: #{e}" }
|
55
|
+
|
56
|
+
rescue => e
|
57
|
+
|
58
|
+
log.error("Watch"){ "Build failed -- #{e.class.name}: #{e}" }
|
50
59
|
|
51
60
|
end
|
52
61
|
|
53
62
|
end
|
54
63
|
|
64
|
+
if options.build
|
65
|
+
prepare_blocks!
|
66
|
+
jobs = WebBlocks::Manager::ParallelBuilder.new self
|
67
|
+
jobs.start :scss
|
68
|
+
jobs.start :js
|
69
|
+
jobs.save_when_done!
|
70
|
+
end
|
71
|
+
|
55
72
|
monitor = FSSM::Monitor.new
|
56
73
|
monitor.path @base_path do
|
57
74
|
glob triggers
|
data/lib/web_blocks/version.rb
CHANGED
data/web_blocks.gemspec
CHANGED
metadata
CHANGED
@@ -1,181 +1,195 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_blocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3.dev
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Bollens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-bower
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: execjs
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: extend_method
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: compass
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sass-css-importer
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: fork
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: fssm
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: yui-compressor
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: facets
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: bundler
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - ">="
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '0'
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - ">="
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: rake
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- -
|
171
|
+
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- -
|
178
|
+
- - ">="
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: coveralls
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
|
-
- -
|
185
|
+
- - ">="
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '0'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
|
-
- -
|
192
|
+
- - ">="
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0'
|
181
195
|
description: Package, configuration and dependency manager for web assets (SCSS, JS,
|
@@ -187,9 +201,9 @@ executables:
|
|
187
201
|
extensions: []
|
188
202
|
extra_rdoc_files: []
|
189
203
|
files:
|
190
|
-
- .coveralls.yml
|
191
|
-
- .gitignore
|
192
|
-
- .travis.yml
|
204
|
+
- ".coveralls.yml"
|
205
|
+
- ".gitignore"
|
206
|
+
- ".travis.yml"
|
193
207
|
- CHANGELOG.md
|
194
208
|
- CONTRIBUTING.md
|
195
209
|
- Gemfile
|
@@ -250,17 +264,11 @@ files:
|
|
250
264
|
- lib/web_blocks/thor/build/all.rb
|
251
265
|
- lib/web_blocks/thor/inspect.rb
|
252
266
|
- lib/web_blocks/thor/inspect/blocks.rb
|
253
|
-
- lib/web_blocks/thor/inspect/blocks/attribute_printer.rb
|
254
|
-
- lib/web_blocks/thor/inspect/blocks/block_printer.rb
|
255
|
-
- lib/web_blocks/thor/inspect/blocks/printer.rb
|
256
267
|
- lib/web_blocks/thor/inspect/bower_registry.rb
|
257
268
|
- lib/web_blocks/thor/inspect/dependency_list.rb
|
258
269
|
- lib/web_blocks/thor/inspect/dependency_order.rb
|
259
270
|
- lib/web_blocks/thor/partial/compile.rb
|
260
|
-
- lib/web_blocks/thor/partial/compile/scss.rb
|
261
271
|
- lib/web_blocks/thor/partial/link.rb
|
262
|
-
- lib/web_blocks/thor/partial/link/js.rb
|
263
|
-
- lib/web_blocks/thor/partial/link/scss.rb
|
264
272
|
- lib/web_blocks/thor/partial/runner.rb
|
265
273
|
- lib/web_blocks/thor/runner.rb
|
266
274
|
- lib/web_blocks/thor/watch.rb
|
@@ -286,17 +294,17 @@ require_paths:
|
|
286
294
|
- lib
|
287
295
|
required_ruby_version: !ruby/object:Gem::Requirement
|
288
296
|
requirements:
|
289
|
-
- -
|
297
|
+
- - ">="
|
290
298
|
- !ruby/object:Gem::Version
|
291
299
|
version: '0'
|
292
300
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
293
301
|
requirements:
|
294
|
-
- -
|
302
|
+
- - ">"
|
295
303
|
- !ruby/object:Gem::Version
|
296
304
|
version: 1.3.1
|
297
305
|
requirements: []
|
298
306
|
rubyforge_project:
|
299
|
-
rubygems_version: 2.
|
307
|
+
rubygems_version: 2.2.2
|
300
308
|
signing_key:
|
301
309
|
specification_version: 4
|
302
310
|
summary: package, configuration and dependency manager for web assets (SCSS, JS, images,
|
@@ -311,4 +319,3 @@ test_files:
|
|
311
319
|
- test/web_blocks/support/tree/node.rb
|
312
320
|
- test/web_blocks/support/tree/parent.rb
|
313
321
|
- test/web_blocks/version.rb
|
314
|
-
has_rdoc:
|
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'web_blocks/thor/inspect/blocks/printer'
|
2
|
-
|
3
|
-
module WebBlocks
|
4
|
-
module Thor
|
5
|
-
class Inspect
|
6
|
-
no_commands do
|
7
|
-
module Blocks
|
8
|
-
class AttributePrinter < Printer
|
9
|
-
|
10
|
-
def initialize key, value, options
|
11
|
-
super options
|
12
|
-
@value = value
|
13
|
-
@key_string = parse_key(key)
|
14
|
-
@value_string = parse_value(value)
|
15
|
-
end
|
16
|
-
|
17
|
-
def parse_key key
|
18
|
-
":#{key}"
|
19
|
-
end
|
20
|
-
|
21
|
-
def parse_value value
|
22
|
-
if @value.is_a?(::Array) or @value.is_a?(::Hash)
|
23
|
-
value.size > 0 ? value : nil
|
24
|
-
elsif value.is_a?(::String)
|
25
|
-
"\"#{value}\""
|
26
|
-
elsif value.is_a?(::TrueClass)
|
27
|
-
"true"
|
28
|
-
elsif value.is_a?(::FalseClass)
|
29
|
-
"false"
|
30
|
-
else
|
31
|
-
nil
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def color
|
36
|
-
@value ? [:green] : [:red]
|
37
|
-
end
|
38
|
-
|
39
|
-
def print!
|
40
|
-
say("#{@key_string} = #{@value_string}", color) if @value_string
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'web_blocks/thor/inspect/blocks/printer'
|
2
|
-
require 'web_blocks/thor/inspect/blocks/attribute_printer'
|
3
|
-
|
4
|
-
module WebBlocks
|
5
|
-
module Thor
|
6
|
-
class Inspect
|
7
|
-
no_commands do
|
8
|
-
module Blocks
|
9
|
-
class BlockPrinter < Printer
|
10
|
-
|
11
|
-
def initialize block, options
|
12
|
-
super options
|
13
|
-
@block = block
|
14
|
-
end
|
15
|
-
|
16
|
-
def print_name!
|
17
|
-
say "#{@block.name} (#{@block.class.name.split('::')[-1]})", (@block.respond_to?(:children) ? :bold : [])
|
18
|
-
end
|
19
|
-
|
20
|
-
def print_attributes!
|
21
|
-
@block.attributes.each do |key, value|
|
22
|
-
AttributePrinter.new(key, value, @options).print!
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def print_children!
|
27
|
-
@block.children.each do |_, child|
|
28
|
-
self.class.new(child, @options).print!
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def print!
|
33
|
-
print_name!
|
34
|
-
print_attributes! if @options[:attributes]
|
35
|
-
print_children! if @block.respond_to? :children
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module WebBlocks
|
2
|
-
module Thor
|
3
|
-
class Inspect
|
4
|
-
no_commands do
|
5
|
-
module Blocks
|
6
|
-
class Printer
|
7
|
-
|
8
|
-
def initialize options
|
9
|
-
@options = options.clone
|
10
|
-
@options[:depth] = 0 unless @options.has_key?(:depth)
|
11
|
-
@options[:depth] = @options[:depth] + 1
|
12
|
-
@shell = ::WebBlocks::Thor::Inspect::Shell::Color.new
|
13
|
-
end
|
14
|
-
|
15
|
-
def say(message = '', color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
|
16
|
-
@shell.say Array.new(@options[:depth]).join(' ') + message, color, force_new_line
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'tsort'
|
2
|
-
require 'web_blocks/thor/partial/link'
|
3
|
-
require 'web_blocks/strategy/compile/scss'
|
4
|
-
|
5
|
-
module WebBlocks
|
6
|
-
module Thor
|
7
|
-
module Partial
|
8
|
-
class Compile
|
9
|
-
|
10
|
-
description = "Compile linked SCSS files"
|
11
|
-
desc "scss", description
|
12
|
-
long_desc description
|
13
|
-
|
14
|
-
def scss
|
15
|
-
|
16
|
-
prepare_blocks!
|
17
|
-
::WebBlocks::Strategy::Compile::Scss.new(self).execute!
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'tsort'
|
2
|
-
require 'web_blocks/thor/partial/link'
|
3
|
-
require 'web_blocks/strategy/link/js'
|
4
|
-
|
5
|
-
module WebBlocks
|
6
|
-
module Thor
|
7
|
-
module Partial
|
8
|
-
class Link
|
9
|
-
|
10
|
-
description = "Construct linked construct of JS files based on dependencies"
|
11
|
-
desc "js", description
|
12
|
-
long_desc description
|
13
|
-
|
14
|
-
def js
|
15
|
-
|
16
|
-
prepare_blocks!
|
17
|
-
::WebBlocks::Strategy::Link::Js.new(self).execute!
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'web_blocks/thor/partial/link'
|
2
|
-
require 'web_blocks/strategy/link/scss'
|
3
|
-
|
4
|
-
module WebBlocks
|
5
|
-
module Thor
|
6
|
-
module Partial
|
7
|
-
class Link
|
8
|
-
|
9
|
-
description = "Construct linked construct of SCSS files based on dependencies"
|
10
|
-
desc "scss", description
|
11
|
-
long_desc description
|
12
|
-
|
13
|
-
def scss
|
14
|
-
|
15
|
-
prepare_blocks!
|
16
|
-
::WebBlocks::Strategy::Link::Scss.new(self).execute!
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|