bower_vendor 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -4
- data/config/bower_vendor.yml +4 -0
- data/lib/bower_vendor/base.rb +10 -0
- data/lib/bower_vendor/copy.rb +2 -0
- data/lib/bower_vendor/setup.rb +4 -2
- data/lib/bower_vendor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40b94a6c0e67435ecf67a7c9bce571bde6d76977
|
4
|
+
data.tar.gz: c44f3a324598d272eee982c6340d348fc00ee8e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f448ce2d796af330109869cd884e6869ce2a5591d536b67156bcfa974f0f6ad77b96114c6ac75abd8e8916b8f139c7823002e2c7ec6317991fba9eda15b160f
|
7
|
+
data.tar.gz: a2f344f6d003323bb7402c4b10ef61171567e846c8c92cf3bbde5e5d7e865837777426d2055bfc82b0d438417db819166abf88fae414c0d52b924218e5035593
|
data/README.md
CHANGED
@@ -75,10 +75,30 @@ bundle exec rake vendor:all
|
|
75
75
|
|
76
76
|
Assets will be copied into vendor/assets
|
77
77
|
|
78
|
+
3) Using in application
|
79
|
+
|
80
|
+
Instructions for bootstrap-sass are shown in https://github.com/twbs/bootstrap-sass
|
81
|
+
|
82
|
+
app/assets/stylesheets/import_bootstrap.scss
|
83
|
+
````css
|
84
|
+
$icon-font-path: "bootstrap-sass-3.3.4/";
|
85
|
+
@import "bootstrap-sass-3.3.4/bootstrap-sprockets";
|
86
|
+
@import "bootstrap-sass-3.3.4/bootstrap";
|
87
|
+
```
|
88
|
+
|
89
|
+
app/assets/javascripts/application.js
|
90
|
+
````javascript
|
91
|
+
//
|
92
|
+
//= require jquery-2.1.3/jquery
|
93
|
+
//= require jquery-ujs-1.0.3/rails
|
94
|
+
//= require lodash-3.0.0/lodash
|
95
|
+
//= require bootstrap-sass-3.3.4/bootstrap-sprockets
|
96
|
+
//
|
97
|
+
//= require angular-1.3.15/angular
|
98
|
+
//
|
99
|
+
```
|
78
100
|
|
79
101
|
# TODO
|
80
102
|
|
81
|
-
-
|
82
|
-
|
83
|
-
* should support also fonts, etc.
|
84
|
-
- Support more complex paths for assets
|
103
|
+
- Improve documentation
|
104
|
+
- Fix SVG image vs. font issue
|
data/config/bower_vendor.yml
CHANGED
@@ -2,18 +2,22 @@
|
|
2
2
|
base_dir: vendor/assets
|
3
3
|
dst_dirs:
|
4
4
|
# javascripts
|
5
|
+
coffee: javascripts
|
5
6
|
js: javascripts
|
6
7
|
es6: javascripts
|
7
8
|
next: javascripts
|
8
9
|
# stylesheets
|
9
10
|
css: stylesheets
|
11
|
+
sass: stylesheets
|
10
12
|
scss: stylesheets
|
13
|
+
less: stylesheets
|
11
14
|
# fonts
|
12
15
|
eot: fonts
|
13
16
|
ttf: fonts
|
14
17
|
woff: fonts
|
15
18
|
woff2: fonts
|
16
19
|
# images
|
20
|
+
gif: images
|
17
21
|
jpg: images
|
18
22
|
jpeg: images
|
19
23
|
png: images
|
data/lib/bower_vendor/base.rb
CHANGED
@@ -5,6 +5,16 @@ module BowerVendor
|
|
5
5
|
|
6
6
|
def vendors
|
7
7
|
@vendors ||= YAML.load_file('vendor.yml')
|
8
|
+
validate_vendors
|
9
|
+
@vendors
|
10
|
+
end
|
11
|
+
|
12
|
+
def validate_vendors
|
13
|
+
# validate resources
|
14
|
+
@vendors.each do |vendor_key, vendor|
|
15
|
+
raise "VERSION MISSING: #{vendor.inspect}" unless vendor['version']
|
16
|
+
raise "ASSETS MISSING: #{vendor.inspect}" unless vendor['assets']
|
17
|
+
end
|
8
18
|
end
|
9
19
|
|
10
20
|
def config
|
data/lib/bower_vendor/copy.rb
CHANGED
data/lib/bower_vendor/setup.rb
CHANGED
@@ -14,8 +14,10 @@ module BowerVendor
|
|
14
14
|
},
|
15
15
|
}
|
16
16
|
vendors.each do |vendor_key, vendor|
|
17
|
-
|
18
|
-
|
17
|
+
version = vendor['version']
|
18
|
+
|
19
|
+
data[:dependencies][vendor_key] = version
|
20
|
+
data[:resolutions][vendor_key] = version
|
19
21
|
end
|
20
22
|
File.write("#{work_dir}/bower.json", JSON.pretty_generate(data))
|
21
23
|
end
|
data/lib/bower_vendor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bower_vendor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|