joomla-rake 1.0.0 → 1.1.0
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/tasks/jsminify.rb +22 -0
- data/lib/tasks/libraries.rb +4 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1758712743975472cd25f30716ee18c09c99372
|
4
|
+
data.tar.gz: 7f8943a16d2dae3c47852469fb35bffe6ba50595
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e30f4e3970f4dad815015567f7235bafa4fb03e377385a15fcc4dc241645aec14848e3d9b1394484bc0311186abd5fbd4722d28408b7d1df17c6f39da7c2434
|
7
|
+
data.tar.gz: 128223ab39884ea6a4e5449fde292934e74258b7a82a0ca471a0e68f6da1543bce15d56bd981cf9c0215dd4e3304dcff31fb372afe037e14fda1550500869ab9
|
@@ -0,0 +1,22 @@
|
|
1
|
+
##
|
2
|
+
# Helpers to produce minified javascripts
|
3
|
+
#
|
4
|
+
|
5
|
+
##
|
6
|
+
# Compile JS into minified sources
|
7
|
+
#
|
8
|
+
# Compiles JS sources defined in +definitions+
|
9
|
+
def compile_js_sources(base_dir, definitions)
|
10
|
+
chdir(base_dir) do
|
11
|
+
definitions.each do |definition|
|
12
|
+
|
13
|
+
jscompressor = :uglifyjs
|
14
|
+
|
15
|
+
sources = definition['inputs'].join(' ')
|
16
|
+
|
17
|
+
sh %{cat #{sources} > #{definition['output']}.tmp}
|
18
|
+
sh %{#{jscompressor} #{definition['output']}.tmp > #{definition['output']}}
|
19
|
+
rm definition['output'] + '.tmp'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/tasks/libraries.rb
CHANGED
@@ -54,6 +54,10 @@ def build_library(name)
|
|
54
54
|
end # ext.files
|
55
55
|
end # ext
|
56
56
|
|
57
|
+
if $package['js'].keys.include? "libraries/#{name}"
|
58
|
+
compile_js_sources(lib_build_area, $package['js']["libraries/#{name}"])
|
59
|
+
end
|
60
|
+
|
57
61
|
manifest.target!
|
58
62
|
manifest_file.flush
|
59
63
|
manifest_file.close
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: joomla-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leo Adamek
|
@@ -22,6 +22,7 @@ files:
|
|
22
22
|
- lib/tasks/codesniff.rb
|
23
23
|
- lib/tasks/components.rb
|
24
24
|
- lib/tasks/helper_tasks.rb
|
25
|
+
- lib/tasks/jsminify.rb
|
25
26
|
- lib/tasks/less.rb
|
26
27
|
- lib/tasks/libraries.rb
|
27
28
|
- lib/tasks/modules.rb
|