distil 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Buildfile +33 -0
- data/VERSION +1 -1
- data/assets/mime.types +1240 -0
- data/bin/distil-old +78 -0
- data/distil.gemspec +6 -3
- data/distil.tmproj +32 -2
- data/lib/distil/project/distil-project.rb +4 -1
- metadata +7 -4
data/bin/distil-old
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
module Distil
|
3
|
+
|
4
|
+
LIB_DIR= File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
|
5
|
+
VENDOR_DIR= File.expand_path(File.join(File.dirname(__FILE__), "..", "vendor"))
|
6
|
+
ASSETS_DIR= File.expand_path(File.join(File.dirname(__FILE__), "..", "assets"))
|
7
|
+
APP_NAME= File.basename($0)
|
8
|
+
|
9
|
+
$:.unshift(LIB_DIR)
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
require "distil"
|
14
|
+
|
15
|
+
arg_settings= {}
|
16
|
+
project_file= nil
|
17
|
+
args= []
|
18
|
+
|
19
|
+
ARGV.each { |v|
|
20
|
+
if (!v[/^-/])
|
21
|
+
args << v
|
22
|
+
next
|
23
|
+
end
|
24
|
+
|
25
|
+
v= v.gsub(/^-+/, '')
|
26
|
+
|
27
|
+
key,value= v.split("=")
|
28
|
+
key.gsub!("-", "_")
|
29
|
+
|
30
|
+
value=true if !value
|
31
|
+
|
32
|
+
if ("f"==key || "file"==key || "buildfile"==key)
|
33
|
+
project_file= value
|
34
|
+
next
|
35
|
+
end
|
36
|
+
|
37
|
+
arg_settings[key]= value
|
38
|
+
}
|
39
|
+
|
40
|
+
def find_project_file(dir=nil)
|
41
|
+
dir ||= Dir.pwd
|
42
|
+
|
43
|
+
immediate_projects= Dir.glob(File.join(dir, "*.jsproj"))
|
44
|
+
if (!immediate_projects.empty? && 1==immediate_projects.length)
|
45
|
+
return immediate_projects[0]
|
46
|
+
end
|
47
|
+
|
48
|
+
while dir.length > 1
|
49
|
+
Dir.glob(File.join(dir, '*.jsproj')) { |file|
|
50
|
+
return file if File.basename(dir)===File.basename(file, '.jsproj')
|
51
|
+
}
|
52
|
+
dir = File.dirname(dir)
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
# Change working directory to the folder containing the build YML file.
|
59
|
+
project_file||= find_project_file
|
60
|
+
|
61
|
+
if !project_file
|
62
|
+
puts "#{Distil::APP_NAME}: can't find project file"
|
63
|
+
exit
|
64
|
+
end
|
65
|
+
|
66
|
+
Dir.chdir(File.dirname(project_file))
|
67
|
+
|
68
|
+
project= Distil::DistilProject.new(project_file, arg_settings)
|
69
|
+
|
70
|
+
if 0==args.length
|
71
|
+
args << "build"
|
72
|
+
end
|
73
|
+
|
74
|
+
args.each { |cmd|
|
75
|
+
project.send cmd
|
76
|
+
exit 1 if project.total_error_count > 0
|
77
|
+
exit 1 if project.warnings_are_errors && project.total_warning_count > 0
|
78
|
+
}
|
data/distil.gemspec
CHANGED
@@ -5,20 +5,23 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{distil}
|
8
|
-
s.version = "0.13.
|
8
|
+
s.version = "0.13.2"
|
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-
|
12
|
+
s.date = %q{2010-11-23}
|
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"]
|
16
16
|
s.extensions = ["vendor/extconf.rb"]
|
17
17
|
s.files = [
|
18
|
-
"
|
18
|
+
"Buildfile",
|
19
|
+
"Rakefile",
|
19
20
|
"VERSION",
|
20
21
|
"assets/distil.js",
|
22
|
+
"assets/mime.types",
|
21
23
|
"bin/distil",
|
24
|
+
"bin/distil-old",
|
22
25
|
"distil.gemspec",
|
23
26
|
"distil.tmproj",
|
24
27
|
"lib/distil.rb",
|
data/distil.tmproj
CHANGED
@@ -26,9 +26,37 @@
|
|
26
26
|
<key>caret</key>
|
27
27
|
<dict>
|
28
28
|
<key>column</key>
|
29
|
-
<integer>
|
29
|
+
<integer>48</integer>
|
30
30
|
<key>line</key>
|
31
|
-
<integer>
|
31
|
+
<integer>17</integer>
|
32
|
+
</dict>
|
33
|
+
<key>firstVisibleColumn</key>
|
34
|
+
<integer>0</integer>
|
35
|
+
<key>firstVisibleLine</key>
|
36
|
+
<integer>0</integer>
|
37
|
+
</dict>
|
38
|
+
<key>lib/distil/product.rb</key>
|
39
|
+
<dict>
|
40
|
+
<key>caret</key>
|
41
|
+
<dict>
|
42
|
+
<key>column</key>
|
43
|
+
<integer>25</integer>
|
44
|
+
<key>line</key>
|
45
|
+
<integer>106</integer>
|
46
|
+
</dict>
|
47
|
+
<key>firstVisibleColumn</key>
|
48
|
+
<integer>0</integer>
|
49
|
+
<key>firstVisibleLine</key>
|
50
|
+
<integer>65</integer>
|
51
|
+
</dict>
|
52
|
+
<key>lib/distil/product/pdoc-product.rb</key>
|
53
|
+
<dict>
|
54
|
+
<key>caret</key>
|
55
|
+
<dict>
|
56
|
+
<key>column</key>
|
57
|
+
<integer>10</integer>
|
58
|
+
<key>line</key>
|
59
|
+
<integer>2</integer>
|
32
60
|
</dict>
|
33
61
|
<key>firstVisibleColumn</key>
|
34
62
|
<integer>0</integer>
|
@@ -39,6 +67,8 @@
|
|
39
67
|
<key>openDocuments</key>
|
40
68
|
<array>
|
41
69
|
<string>Rakefile</string>
|
70
|
+
<string>lib/distil/product.rb</string>
|
71
|
+
<string>lib/distil/product/pdoc-product.rb</string>
|
42
72
|
</array>
|
43
73
|
<key>showFileHierarchyDrawer</key>
|
44
74
|
<false/>
|
@@ -72,8 +72,10 @@ module Distil
|
|
72
72
|
build if !up_to_date
|
73
73
|
|
74
74
|
require 'webrick'
|
75
|
+
mime_types = WEBrick::HTTPUtils::load_mime_types(File.join(ASSETS_DIR, "mime.types"))
|
75
76
|
config= {
|
76
|
-
:Port => 8888
|
77
|
+
:Port => 8888,
|
78
|
+
:MimeTypes => mime_types
|
77
79
|
}
|
78
80
|
|
79
81
|
server= WEBrick::HTTPServer.new(config)
|
@@ -86,6 +88,7 @@ module Distil
|
|
86
88
|
b.open("http://localhost:8888/")
|
87
89
|
server.start
|
88
90
|
end
|
91
|
+
alias :server :launch
|
89
92
|
|
90
93
|
def load_distileries
|
91
94
|
return if distileries.nil?
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 47
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 13
|
9
|
-
-
|
10
|
-
version: 0.13.
|
9
|
+
- 2
|
10
|
+
version: 0.13.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeff Watkins
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-23 00:00:00 -08:00
|
19
19
|
default_executable: distil
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -75,10 +75,13 @@ extensions:
|
|
75
75
|
extra_rdoc_files: []
|
76
76
|
|
77
77
|
files:
|
78
|
+
- Buildfile
|
78
79
|
- Rakefile
|
79
80
|
- VERSION
|
80
81
|
- assets/distil.js
|
82
|
+
- assets/mime.types
|
81
83
|
- bin/distil
|
84
|
+
- bin/distil-old
|
82
85
|
- distil.gemspec
|
83
86
|
- distil.tmproj
|
84
87
|
- lib/distil.rb
|