distil 0.11.4 → 0.11.5
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/VERSION +1 -1
- data/distil.gemspec +2 -2
- data/lib/distil/product/javascript-product.rb +14 -6
- data/lib/distil/target.rb +4 -0
- data/lib/distil/task/validate-js-task.rb +5 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.5
|
data/distil.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{distil}
|
8
|
-
s.version = "0.11.
|
8
|
+
s.version = "0.11.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeff Watkins"]
|
12
|
-
s.date = %q{2010-06-
|
12
|
+
s.date = %q{2010-06-16}
|
13
13
|
s.default_executable = %q{distil}
|
14
14
|
s.description = %q{A build tool for Javascript and CSS that takes advantage of best-of-breed helper applications Javascript Lint and JSDoc Toolkit}
|
15
15
|
s.executables = ["distil"]
|
@@ -5,14 +5,14 @@ module Distil
|
|
5
5
|
|
6
6
|
extension "js"
|
7
7
|
|
8
|
-
option :global_export
|
8
|
+
option :global_export
|
9
9
|
option :additional_globals, [], :aliases=>['globals']
|
10
10
|
|
11
|
-
def initialize(settings, target)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
11
|
+
# def initialize(settings, target)
|
12
|
+
# super(settings, target)
|
13
|
+
#
|
14
|
+
# @options.global_export=target.name if true==global_export
|
15
|
+
# end
|
16
16
|
|
17
17
|
def before_externals(f)
|
18
18
|
f.puts("/*#nocode+*/")
|
@@ -84,6 +84,8 @@ EOS
|
|
84
84
|
class JavascriptDebugProduct < JavascriptBaseProduct
|
85
85
|
include Debug
|
86
86
|
extension "js"
|
87
|
+
|
88
|
+
option :global_export
|
87
89
|
|
88
90
|
def write_output
|
89
91
|
return if up_to_date
|
@@ -108,6 +110,12 @@ EOS
|
|
108
110
|
File.open(filename, "w") { |f|
|
109
111
|
f.write(target.notice_text)
|
110
112
|
f.write("#{bootstrap_source}\n\n") if bootstrap
|
113
|
+
|
114
|
+
if global_export
|
115
|
+
f.write("window.#{global_export}={};");
|
116
|
+
f.write("\n\n");
|
117
|
+
end
|
118
|
+
|
111
119
|
files.each { |file|
|
112
120
|
f.write("/*jsl:import #{relative_path(file)}*/\n")
|
113
121
|
}
|
data/lib/distil/target.rb
CHANGED
@@ -21,6 +21,8 @@ module Distil
|
|
21
21
|
option :minify, true
|
22
22
|
option :compress, true
|
23
23
|
|
24
|
+
option :global_export, :aliases=>['export']
|
25
|
+
|
24
26
|
def initialize(settings, project)
|
25
27
|
@project=project
|
26
28
|
|
@@ -39,6 +41,8 @@ module Distil
|
|
39
41
|
self.exclude_files= FileSet.new
|
40
42
|
end
|
41
43
|
|
44
|
+
@options.global_export=name if true==global_export
|
45
|
+
|
42
46
|
include_projects.each { |p|
|
43
47
|
external_project= project.external_project_with_name(p)
|
44
48
|
if !external_project
|
@@ -8,6 +8,7 @@ module Distil
|
|
8
8
|
include ErrorReporter
|
9
9
|
|
10
10
|
option :jsl_conf, "#{LIB_DIR}/jsl.conf"
|
11
|
+
option :global_export
|
11
12
|
|
12
13
|
def handles_file(file)
|
13
14
|
return ["js"].include?(file.content_type)
|
@@ -30,6 +31,10 @@ module Distil
|
|
30
31
|
|
31
32
|
tmp << "+define distil\n"
|
32
33
|
|
34
|
+
if (global_export)
|
35
|
+
tmp << "+define #{global_export}"
|
36
|
+
end
|
37
|
+
|
33
38
|
# add aliases
|
34
39
|
target.project.external_projects.each { |project|
|
35
40
|
import_file= project.product_name(:import, 'js')
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 11
|
8
|
-
-
|
9
|
-
version: 0.11.
|
8
|
+
- 5
|
9
|
+
version: 0.11.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jeff Watkins
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-16 00:00:00 -07:00
|
18
18
|
default_executable: distil
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|