rjs-rails 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
- data/lib/rjs-rails/build/api.rb +12 -11
- data/lib/rjs-rails/sprockets.rb +1 -0
- data/lib/rjs-rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54b4f1d9d66985aefdb978162d187e5ff8019aad
|
4
|
+
data.tar.gz: 94cd47d4bd8010ad6ea82a85a14a97acbe75bea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90f5113c944f0e87664e8d8bab1e6b76bf8d56842a15b9ac07adafef6f423c43de5c6e9f919c05aa74718fe5985fc81470025074ebbd4afcbad3ac786af94c96
|
7
|
+
data.tar.gz: 751153725cf4b039e2d1ad57b175ee638fa2e01ceab15d5f12fc69c6f70c9bb6b0f3a08e642b5d4c5690645adc1774563107d4c2e6c2e158e051020b4879396d
|
data/lib/rjs-rails/build/api.rb
CHANGED
@@ -20,17 +20,18 @@ module RjsRails
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def copy_sources
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
23
|
+
pid = Process.fork do
|
24
|
+
empty_dirs
|
25
|
+
puts "=> copying sources"
|
26
|
+
asset_paths.each_with_index do |logical_path, i|
|
27
|
+
clear = "\r\e[0K"
|
28
|
+
print clear
|
29
|
+
print "#{i+1}/#{num_assets} #{logical_path}"
|
30
|
+
write_asset logical_path
|
31
|
+
end
|
32
|
+
puts
|
32
33
|
end
|
33
|
-
|
34
|
+
Process.wait
|
34
35
|
end
|
35
36
|
|
36
37
|
|
@@ -47,7 +48,7 @@ module RjsRails
|
|
47
48
|
end
|
48
49
|
|
49
50
|
def optimize
|
50
|
-
puts "=> optimizing "
|
51
|
+
puts "=> optimizing requirejs files "
|
51
52
|
command = "node #{env.build_js}"
|
52
53
|
IO.popen(command) do |f|
|
53
54
|
f.each { |line| puts line }
|
data/lib/rjs-rails/sprockets.rb
CHANGED
@@ -24,6 +24,7 @@ module RjsRails
|
|
24
24
|
|
25
25
|
def custom_sprockets_env
|
26
26
|
custom_env = rails_assets_env.clone
|
27
|
+
custom_env.instance_variable_set :@bundle_processors, rails_assets_env.bundle_processors
|
27
28
|
path = "tmp/cache/rjs_assets_#{::Rails.env}"
|
28
29
|
custom_env.cache = ActiveSupport::Cache::FileStore.new(path)
|
29
30
|
custom_env.js_compressor = nil
|
data/lib/rjs-rails/version.rb
CHANGED