bower-rails 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3abd7258ac3490088ec6235eb38f8dcf9841e184
|
4
|
+
data.tar.gz: c4c9518aef2efb9ad170d117ff9326025f00797f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2367658e828a6c11ea6438228fff3dc814ce3cc1b25ed3a3f57558afa67bada7fb221a4c6b844630bc4bafacc3faa220163e0f61322312b81754d89a72f492c1
|
7
|
+
data.tar.gz: 587ad05a7ba55e22a21d59749258f9a98dfdfc9176e9cfddb6effce400a8b044f3603309d1ab3cb8116fc8e31cc8ec324eebf115609275a161c8712450145da8
|
data/README.md
CHANGED
@@ -3,28 +3,17 @@ bower-rails
|
|
3
3
|
|
4
4
|
rake tasks for bower on rails. Dependency file is bower.json in Rails root dir.
|
5
5
|
|
6
|
-
**Asset Pipeline**
|
7
|
-
|
8
|
-
As of version 0.3.0 bower-rails installs components in the asset directory, rather than assets/javascripts. This is because some of these packages also include stylesheets, or images. As such you may have to add components to your asset pipeline.
|
9
|
-
|
10
|
-
``` Ruby
|
11
|
-
# config/application.rb
|
12
|
-
|
13
|
-
config.assets.paths << Rails.root.join("lib", "assets", "components")
|
14
|
-
config.assets.paths << Rails.root.join("vendor", "assets", "components")
|
15
|
-
```
|
16
|
-
|
17
6
|
**Requirements**
|
18
7
|
|
19
8
|
* [node](http://nodejs.org) ([on github](https://github.com/joyent/node))
|
20
|
-
* [bower](https://github.com/
|
9
|
+
* [bower](https://github.com/bower/bower) (>= 0.10.0) installed with npm
|
21
10
|
|
22
11
|
**Install**
|
23
12
|
|
24
13
|
in Gemfile
|
25
14
|
|
26
15
|
``` Ruby
|
27
|
-
gem "bower-rails", "~> 0.
|
16
|
+
gem "bower-rails", "~> 0.4.0"
|
28
17
|
```
|
29
18
|
|
30
19
|
**Initialize**
|
@@ -44,14 +33,16 @@ The bower.json file is two seperate bower [component.js](https://github.com/twit
|
|
44
33
|
``` javascript
|
45
34
|
{
|
46
35
|
"lib": {
|
36
|
+
"name": "bower-rails generated lib assets",
|
47
37
|
"dependencies": {
|
48
38
|
"threex" : "git@github.com:rharriso/threex.git",
|
49
39
|
"gsvpano.js" : "https://github.com/rharriso/GSVPano.js/blob/master/src/GSVPano.js"
|
50
40
|
}
|
51
41
|
},
|
52
42
|
"vendor": {
|
43
|
+
"name": "bower-rails generated vendor assets",
|
53
44
|
"dependencies": {
|
54
|
-
"three.js"
|
45
|
+
"three.js" : "https://raw.github.com/mrdoob/three.js/master/build/three.js"
|
55
46
|
}
|
56
47
|
}
|
57
48
|
}
|
data/lib/bower-rails/railtie.rb
CHANGED
@@ -6,7 +6,7 @@ module BowerRails
|
|
6
6
|
|
7
7
|
config.after_initialize do |app|
|
8
8
|
["lib", "vendor"].each do |dir|
|
9
|
-
app.config.assets.paths << Rails.root.join(dir, 'assets', '
|
9
|
+
app.config.assets.paths << Rails.root.join(dir, 'assets', 'bower_components')
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -14,4 +14,4 @@ module BowerRails
|
|
14
14
|
load "tasks/bower.rake"
|
15
15
|
end
|
16
16
|
end
|
17
|
-
end
|
17
|
+
end
|
@@ -2,7 +2,7 @@ module BowerRails
|
|
2
2
|
module Generators
|
3
3
|
class InitializeGenerator < Rails::Generators::Base
|
4
4
|
desc "Adds a boilerplate component.json file to root of rails project"
|
5
|
-
|
5
|
+
|
6
6
|
def self.source_root
|
7
7
|
@_bower_rails_source_root ||= File.expand_path("../templates", __FILE__)
|
8
8
|
end
|
data/lib/tasks/bower.rake
CHANGED
@@ -17,7 +17,7 @@ namespace :bower do
|
|
17
17
|
sh 'bower update'
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
namespace :dsl do
|
22
22
|
desc "install files from bower"
|
23
23
|
task :install do
|
@@ -39,7 +39,7 @@ end
|
|
39
39
|
|
40
40
|
def get_bower_root_path
|
41
41
|
if defined?(Rails)
|
42
|
-
return Rails.root
|
42
|
+
return Rails.root
|
43
43
|
else
|
44
44
|
return Dir.pwd
|
45
45
|
end
|
@@ -49,12 +49,12 @@ def dsl_perform_command remove_components = true
|
|
49
49
|
bower_root = get_bower_root_path
|
50
50
|
BowerRails::Dsl.config = {:root_path => bower_root}
|
51
51
|
dsl = BowerRails::Dsl.evalute(File.join(bower_root, "Jsfile"))
|
52
|
-
|
53
|
-
if remove_components
|
52
|
+
|
53
|
+
if remove_components
|
54
54
|
dsl.write_bower_json
|
55
55
|
puts "bower.js files generated"
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
dsl.directories.each do |dir|
|
59
59
|
Dir.chdir(dir) do
|
60
60
|
yield
|
@@ -80,7 +80,7 @@ def perform_command remove_components = true
|
|
80
80
|
Dir.chdir(dir) do
|
81
81
|
|
82
82
|
#remove old components
|
83
|
-
FileUtils.rm_rf("
|
83
|
+
FileUtils.rm_rf("bower_components") if remove_components
|
84
84
|
|
85
85
|
#create bower json
|
86
86
|
File.open("bower.json","w") do |f|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bower-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ross Harrison
|
@@ -27,26 +26,25 @@ files:
|
|
27
26
|
- README.md
|
28
27
|
homepage: https://github.com/rharriso/bower-rails
|
29
28
|
licenses: []
|
29
|
+
metadata: {}
|
30
30
|
post_install_message:
|
31
31
|
rdoc_options: []
|
32
32
|
require_paths:
|
33
33
|
- lib
|
34
34
|
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
35
|
requirements:
|
37
|
-
- -
|
36
|
+
- - '>='
|
38
37
|
- !ruby/object:Gem::Version
|
39
38
|
version: '0'
|
40
39
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
40
|
requirements:
|
43
|
-
- -
|
41
|
+
- - '>='
|
44
42
|
- !ruby/object:Gem::Version
|
45
43
|
version: '0'
|
46
44
|
requirements: []
|
47
45
|
rubyforge_project:
|
48
|
-
rubygems_version:
|
46
|
+
rubygems_version: 2.0.3
|
49
47
|
signing_key:
|
50
|
-
specification_version:
|
48
|
+
specification_version: 4
|
51
49
|
summary: Bower for Rails
|
52
50
|
test_files: []
|