distil 0.12.0 → 0.12.1
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/assets/distil.js +9 -1
- data/distil.gemspec +2 -2
- data/lib/distil.rb +4 -0
- data/lib/distil/product/javascript-product.rb +5 -1
- data/lib/distil/product/minified.rb +1 -1
- data/lib/distil/project/external-project.rb +2 -2
- data/lib/distil/target.rb +9 -13
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.12.
|
1
|
+
0.12.1
|
data/assets/distil.js
CHANGED
@@ -267,7 +267,15 @@
|
|
267
267
|
return;
|
268
268
|
}
|
269
269
|
|
270
|
-
|
270
|
+
if (distil.sync)
|
271
|
+
{
|
272
|
+
var url= getRunningScriptSource();
|
273
|
+
var lastSlash= url.lastIndexOf('/');
|
274
|
+
def.path= url.substring(0,lastSlash+1) + def.folder;
|
275
|
+
}
|
276
|
+
else
|
277
|
+
def.path= currentResource.path + def.folder;
|
278
|
+
|
271
279
|
if ('/'!==def.path.slice(-1))
|
272
280
|
def.path+='/';
|
273
281
|
|
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.12.
|
8
|
+
s.version = "0.12.1"
|
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-07-
|
12
|
+
s.date = %q{2010-07-14}
|
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"]
|
data/lib/distil.rb
CHANGED
@@ -114,8 +114,12 @@ EOS
|
|
114
114
|
files.each { |file|
|
115
115
|
f.write("/*jsl:import #{relative_path(file)}*/\n")
|
116
116
|
}
|
117
|
+
|
118
|
+
if (APP_TYPE==target.target_type)
|
119
|
+
f.puts "distil.sync= #{Kernel::Boolean(synchronous_load)};"
|
120
|
+
end
|
121
|
+
|
117
122
|
f.write(<<-EOS)
|
118
|
-
distil.sync= #{synchronous_load ? 'true' : 'false'};
|
119
123
|
|
120
124
|
distil.module('#{target.name}', {
|
121
125
|
folder: '',
|
@@ -17,7 +17,7 @@ module Distil
|
|
17
17
|
@up_to_date= true
|
18
18
|
|
19
19
|
# Run the Y!UI Compressor
|
20
|
-
system "java -jar #{COMPRESSOR} #{concatenated_name} -o #{filename}"
|
20
|
+
system "java -jar #{COMPRESSOR} \"#{concatenated_name}\" -o \"#{filename}\""
|
21
21
|
|
22
22
|
if 'css'==extension
|
23
23
|
buffer= File.read(filename)
|
@@ -18,7 +18,7 @@ module Distil
|
|
18
18
|
config["source_folder"]= "build/$(mode)"
|
19
19
|
end
|
20
20
|
super(config, parent)
|
21
|
-
|
21
|
+
|
22
22
|
self.output_folder= File.join(parent.output_folder, name)
|
23
23
|
end
|
24
24
|
|
@@ -47,7 +47,7 @@ module Distil
|
|
47
47
|
FileUtils.rm(output_folder) if File.symlink?(output_folder)
|
48
48
|
|
49
49
|
if DEBUG_MODE==mode
|
50
|
-
FileUtils.symlink(File.expand_path(source_folder), output_folder)
|
50
|
+
FileUtils.symlink(SourceFile.path_relative_to_folder(File.expand_path(source_folder), File.dirname(output_folder)), output_folder)
|
51
51
|
else
|
52
52
|
FileUtils.cp_r(File.expand_path(source_folder), output_folder)
|
53
53
|
end
|
data/lib/distil/target.rb
CHANGED
@@ -141,33 +141,29 @@ module Distil
|
|
141
141
|
assets.each { |a|
|
142
142
|
path= a.file_path || a.relative_to_folder(source_folder)
|
143
143
|
|
144
|
+
next if File.expand_path(path).starts_with?(project.output_folder)
|
145
|
+
|
144
146
|
parts= File.dirname(path).split(File::SEPARATOR)
|
145
147
|
if ('.'==parts[0])
|
146
|
-
product_path= File.join(output_folder, path)
|
148
|
+
product_path= File.join(project.output_folder, path)
|
147
149
|
FileUtils.rm product_path if File.exists? product_path
|
148
|
-
File.symlink a.relative_to_folder(output_folder), product_path
|
150
|
+
File.symlink a.relative_to_folder(project.output_folder), product_path
|
149
151
|
next
|
150
152
|
end
|
151
153
|
|
152
|
-
|
153
|
-
f= parts[0..i].join(File::SEPARATOR)
|
154
|
-
if !folders.include?(f)
|
155
|
-
folders << f
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
154
|
+
folders << parts[0] if !folders.include?(parts[0])
|
159
155
|
}
|
160
156
|
|
161
|
-
folders.sort!
|
162
|
-
|
163
157
|
folders.each { |f|
|
164
158
|
src_folder= File.join(source_folder, f)
|
165
159
|
product_folder= File.join(project.output_folder, f)
|
160
|
+
|
161
|
+
relative_folder= SourceFile.path_relative_to_folder(src_folder, project.output_folder)
|
166
162
|
|
167
|
-
next if File.exists?(product_folder)
|
168
163
|
FileUtils.rm product_folder if File.symlink?(product_folder)
|
164
|
+
next if File.directory?(product_folder)
|
169
165
|
|
170
|
-
File.symlink
|
166
|
+
File.symlink relative_folder, product_folder
|
171
167
|
}
|
172
168
|
end
|
173
169
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 12
|
8
|
-
-
|
9
|
-
version: 0.12.
|
8
|
+
- 1
|
9
|
+
version: 0.12.1
|
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-07-
|
17
|
+
date: 2010-07-14 00:00:00 -07:00
|
18
18
|
default_executable: distil
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|