bower-rails 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/tasks/bower.rake +8 -8
- metadata +1 -1
data/lib/tasks/bower.rake
CHANGED
@@ -2,20 +2,20 @@ require 'json'
|
|
2
2
|
require 'pp'
|
3
3
|
|
4
4
|
namespace :bower do
|
5
|
-
|
5
|
+
|
6
6
|
desc "install files from bower"
|
7
|
-
task :install do
|
7
|
+
task :install do
|
8
8
|
#install to corresponding directories
|
9
|
-
perform_command do
|
10
|
-
|
9
|
+
perform_command do
|
10
|
+
sh 'bower install'
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
desc "update bower packages"
|
15
|
-
task :update do
|
15
|
+
task :update do
|
16
16
|
#install to corresponding directories
|
17
17
|
perform_command false do
|
18
|
-
|
18
|
+
sh 'bower update'
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -32,10 +32,10 @@ def perform_command remove_components = true
|
|
32
32
|
|
33
33
|
#go in to dir to act
|
34
34
|
Dir.chdir("#{Rails.root}/#{dir}/assets/javascripts") do
|
35
|
-
|
35
|
+
|
36
36
|
#remove old components
|
37
37
|
FileUtils.rm_rf("components") if remove_components
|
38
|
-
|
38
|
+
|
39
39
|
#create component json
|
40
40
|
File.open("component.json","w") do |f|
|
41
41
|
f.write(data.to_json)
|