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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65f284fbf9697205a3f75403c7c6d80e22c5efc1
4
- data.tar.gz: 27ddf22a0806e8c1e698fdbf41ced38ad480aa8c
3
+ metadata.gz: 40b94a6c0e67435ecf67a7c9bce571bde6d76977
4
+ data.tar.gz: c44f3a324598d272eee982c6340d348fc00ee8e1
5
5
  SHA512:
6
- metadata.gz: 15960412956cedf2315a9b0c5a5de3d964401999e09bab58fa51821e144760191e7403ed89d620f1d5eac5c686e3aba4081d165fec748815942e2bed4d8e1c6e
7
- data.tar.gz: 5a7731e4f3d8a7e31dd7c3f8ddadf38675f68a2e617d013bfac7a439c28406261cee56442123d9c1a5ecaf3408b3fb31902acbcc2d1aac93f96873f6e0091812
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
- - Support other more asset types
82
- * curently only js and css are supported
83
- * should support also fonts, etc.
84
- - Support more complex paths for assets
103
+ - Improve documentation
104
+ - Fix SVG image vs. font issue
@@ -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
@@ -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
@@ -41,6 +41,8 @@ module BowerVendor
41
41
  else
42
42
  msg level, asset
43
43
 
44
+ raise "VERSION MISSING: #{asset_data.inspect}" unless asset_data['version']
45
+
44
46
  version = asset_data['version']
45
47
  src_path = asset.gsub("{{VERSION}}", version)
46
48
 
@@ -14,8 +14,10 @@ module BowerVendor
14
14
  },
15
15
  }
16
16
  vendors.each do |vendor_key, vendor|
17
- data[:dependencies][vendor_key] = vendor['version']
18
- data[:resolutions][vendor_key] = vendor['version']
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
@@ -1,3 +1,3 @@
1
1
  module BowerVendor
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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.6
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-03-26 00:00:00.000000000 Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print