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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89cea9fa8b93f775b6ad17b8b3812c9b265f2a24
4
- data.tar.gz: 057bfb447210e210e9dc3e1911b6e5ab1bfe528e
3
+ metadata.gz: e1758712743975472cd25f30716ee18c09c99372
4
+ data.tar.gz: 7f8943a16d2dae3c47852469fb35bffe6ba50595
5
5
  SHA512:
6
- metadata.gz: c18443a041a7b98b5e443d65a370779e70052f99acb8c46ebc1320a46d329bfda7009b8043e729f268039155eadb94261a85d46764b796346a56b0a51f43667b
7
- data.tar.gz: f55267d9891373bda7c464a4341b0758794776564270326eb8190749e1788f838a2c112b2f578e04ecff788d82439498803e7ab8580a13f378c2509863ea569e
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
@@ -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.0.0
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