envjs 0.1.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. data/.jslintrbrc +29 -0
  2. data/.project +17 -0
  3. data/CHANGELOG.rdoc +3 -0
  4. data/DTD/xhtml-lat1.ent +196 -0
  5. data/DTD/xhtml-special.ent +80 -0
  6. data/DTD/xhtml-symbol.ent +237 -0
  7. data/DTD/xhtml.soc +14 -0
  8. data/DTD/xhtml1-frameset.dtd +1235 -0
  9. data/DTD/xhtml1-strict.dtd +978 -0
  10. data/DTD/xhtml1-transitional.dtd +1201 -0
  11. data/DTD/xhtml1.dcl +192 -0
  12. data/Makefile +7 -0
  13. data/Manifest.txt +287 -0
  14. data/{README → README.rdoc} +24 -3
  15. data/Rakefile +196 -0
  16. data/Wakefile +24 -0
  17. data/build.properties +9 -0
  18. data/build.xml +247 -0
  19. data/gm/jquery.js +6002 -0
  20. data/gm/mainx.js +2648 -0
  21. data/gm/sensx.js +135 -0
  22. data/gm/t.js +6 -0
  23. data/gm/x.html +76 -0
  24. data/htmlparser/BrowserTreeBuilder.java +456 -0
  25. data/htmlparser/README +34 -0
  26. data/htmlparser/build.sh +38 -0
  27. data/jsl/jsl +0 -0
  28. data/jsl/jsl.default.conf +129 -0
  29. data/jsl/jsl.exe +0 -0
  30. data/lib/envjs.rb +2 -0
  31. data/lib/envjs/env.js +22 -3
  32. data/lib/envjs/event_loop.js +2 -0
  33. data/lib/envjs/static.js +155 -21
  34. data/licenses/GPL-LICENSE.txt +278 -0
  35. data/licenses/MIT-LICENSE.txt +20 -0
  36. data/src/base64.js +80 -0
  37. data/src/build.js +6 -0
  38. data/src/cruft/bad.html +24 -0
  39. data/src/cruft/dom.js +606 -0
  40. data/src/cruft/element.js +297 -0
  41. data/src/cruft/good.html +30 -0
  42. data/src/cruft/good.js +32 -0
  43. data/src/cruft/internal.js +81 -0
  44. data/src/cruft/parser.js +458 -0
  45. data/src/css/properties.js +293 -0
  46. data/src/css/rule.js +22 -0
  47. data/src/css/sizzle.js +717 -0
  48. data/src/css/stylesheet.js +52 -0
  49. data/src/dom/attr.js +55 -0
  50. data/src/dom/cdatasection.js +31 -0
  51. data/src/dom/characterdata.js +119 -0
  52. data/src/dom/comment.js +30 -0
  53. data/src/dom/doctype.js +9 -0
  54. data/src/dom/document.js +553 -0
  55. data/src/dom/dom.js +134 -0
  56. data/src/dom/element.js +217 -0
  57. data/src/dom/entities.js +273 -0
  58. data/src/dom/exception.js +28 -0
  59. data/src/dom/fragment.js +37 -0
  60. data/src/dom/implementation.js +602 -0
  61. data/src/dom/instruction.js +51 -0
  62. data/src/dom/namednodemap.js +374 -0
  63. data/src/dom/namespace.js +50 -0
  64. data/src/dom/node.js +618 -0
  65. data/src/dom/nodelist.js +195 -0
  66. data/src/dom/parser.js +1207 -0
  67. data/src/dom/text.js +73 -0
  68. data/src/event/event.js +39 -0
  69. data/src/event/mouseevent.js +4 -0
  70. data/src/event/uievent.js +8 -0
  71. data/src/html/a.js +110 -0
  72. data/src/html/anchor.js +80 -0
  73. data/src/html/area.js +57 -0
  74. data/src/html/base.js +26 -0
  75. data/src/html/blockquote-q.js +19 -0
  76. data/src/html/body.js +19 -0
  77. data/src/html/button.js +21 -0
  78. data/src/html/canvas.js +14 -0
  79. data/src/html/col-colgroup.js +49 -0
  80. data/src/html/collection.js +72 -0
  81. data/src/html/cookie.js +151 -0
  82. data/src/html/del-ins.js +25 -0
  83. data/src/html/div.js +28 -0
  84. data/src/html/document.js +359 -0
  85. data/src/html/element.js +380 -0
  86. data/src/html/fieldset.js +19 -0
  87. data/src/html/form.js +484 -0
  88. data/src/html/frame.js +89 -0
  89. data/src/html/frameset.js +25 -0
  90. data/src/html/head.js +44 -0
  91. data/src/html/html.js +0 -0
  92. data/src/html/htmlparser.js +340 -0
  93. data/src/html/iframe.js +26 -0
  94. data/src/html/image.js +0 -0
  95. data/src/html/img.js +62 -0
  96. data/src/html/input-elements.js +307 -0
  97. data/src/html/input.js +65 -0
  98. data/src/html/label.js +26 -0
  99. data/src/html/legend.js +19 -0
  100. data/src/html/link.js +82 -0
  101. data/src/html/map.js +22 -0
  102. data/src/html/meta.js +37 -0
  103. data/src/html/object.js +89 -0
  104. data/src/html/optgroup.js +25 -0
  105. data/src/html/option.js +97 -0
  106. data/src/html/param.js +38 -0
  107. data/src/html/script.js +122 -0
  108. data/src/html/select.js +129 -0
  109. data/src/html/style.js +31 -0
  110. data/src/html/table.js +199 -0
  111. data/src/html/tbody-thead-tfoot.js +91 -0
  112. data/src/html/td-th.js +18 -0
  113. data/src/html/textarea.js +25 -0
  114. data/src/html/title.js +20 -0
  115. data/src/html/tr.js +114 -0
  116. data/src/intro.js +141 -0
  117. data/src/outro.js +70 -0
  118. data/src/parser/html5.detailed.js +10762 -0
  119. data/src/parser/html5.min.js +503 -0
  120. data/src/parser/html5.pretty.js +10815 -0
  121. data/src/parser/intro.js +42 -0
  122. data/src/parser/outro.js +9 -0
  123. data/src/platform/core.js +323 -0
  124. data/src/platform/johnson.js +479 -0
  125. data/src/platform/rhino.js +327 -0
  126. data/src/platform/static/intro.js +41 -0
  127. data/src/platform/static/outro.js +30 -0
  128. data/src/profile/aop.js +238 -0
  129. data/src/profile/profile.js +402 -0
  130. data/src/serializer/xml.js +21 -0
  131. data/src/svg/animatedstring.js +25 -0
  132. data/src/svg/document.js +25 -0
  133. data/src/svg/element.js +22 -0
  134. data/src/svg/locatable.js +17 -0
  135. data/src/svg/rect.js +18 -0
  136. data/src/svg/rectelement.js +24 -0
  137. data/src/svg/stylable.js +49 -0
  138. data/src/svg/svgelement.js +22 -0
  139. data/src/svg/transformable.js +15 -0
  140. data/src/window/css.js +15 -0
  141. data/src/window/dialog.js +16 -0
  142. data/src/window/document.js +28 -0
  143. data/src/window/event.js +262 -0
  144. data/src/window/history.js +62 -0
  145. data/src/window/location.js +138 -0
  146. data/src/window/navigator.js +48 -0
  147. data/src/window/screen.js +53 -0
  148. data/src/window/timer.js +21 -0
  149. data/src/window/window.js +284 -0
  150. data/src/window/xhr.js +127 -0
  151. data/src/xpath/expression.js +49 -0
  152. data/src/xpath/implementation.js +2482 -0
  153. data/src/xpath/result.js +67 -0
  154. data/src/xpath/util.js +551 -0
  155. data/src/xpath/xmltoken.js +149 -0
  156. data/src/xslt/COPYING +34 -0
  157. data/src/xslt/ajaxslt-0.8.1/AUTHORS +1 -0
  158. data/src/xslt/ajaxslt-0.8.1/ChangeLog +136 -0
  159. data/src/xslt/ajaxslt-0.8.1/Makefile +49 -0
  160. data/src/xslt/ajaxslt-0.8.1/README +102 -0
  161. data/src/xslt/ajaxslt-0.8.1/TODO +15 -0
  162. data/src/xslt/ajaxslt-0.8.1/dom.js +566 -0
  163. data/src/xslt/ajaxslt-0.8.1/dom_unittest.html +24 -0
  164. data/src/xslt/ajaxslt-0.8.1/dom_unittest.js +131 -0
  165. data/src/xslt/ajaxslt-0.8.1/simplelog.js +79 -0
  166. data/src/xslt/ajaxslt-0.8.1/test/xpath.html +18 -0
  167. data/src/xslt/ajaxslt-0.8.1/test/xpath_script.js +45 -0
  168. data/src/xslt/ajaxslt-0.8.1/test/xslt.html +58 -0
  169. data/src/xslt/ajaxslt-0.8.1/test/xslt_script.js +33 -0
  170. data/src/xslt/ajaxslt-0.8.1/unittestsuite.html +26 -0
  171. data/src/xslt/ajaxslt-0.8.1/xmltoken.js +149 -0
  172. data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.html +18 -0
  173. data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.js +811 -0
  174. data/src/xslt/ajaxslt-0.8.1/xpath_unittest.html +39 -0
  175. data/src/xslt/ajaxslt-0.8.1/xpath_unittest.js +557 -0
  176. data/src/xslt/ajaxslt-0.8.1/xpathdebug.js +234 -0
  177. data/src/xslt/ajaxslt-0.8.1/xslt_unittest.html +138 -0
  178. data/src/xslt/ajaxslt-0.8.1/xslt_unittest.js +68 -0
  179. data/src/xslt/implementation.js +625 -0
  180. data/src/xslt/processor.js +37 -0
  181. data/src/xslt/util.js +449 -0
  182. data/test/foo.html +8 -0
  183. data/test/foo.js +40 -0
  184. data/test/jquery.js +6002 -0
  185. data/test/x.js +1 -0
  186. data/test/y.js +1 -0
  187. metadata +245 -14
@@ -1,15 +1,29 @@
1
+ = env.js
2
+
3
+ * http://github.com/smparkes/env-js
4
+ * http://groups.google.com/group/envjs
5
+ * #envjs @ freenode
6
+
7
+ == Description
8
+
9
+ A browser environment for javascript interpreters.
10
+
1
11
  This is a fork of the env.js project (http://github.com/thatcher/env-js/). See that link for env.js details.
12
+ This fork is based on the Johnson Ruby gem
13
+ (http://github.com/jbarnette/johnson).
2
14
 
3
- This fork is based on the Johnson Ruby gem (http://github.com/jbarnette/johnson). It should become obsolete when the Johnson support has been reintegrated into the master repo.
15
+ == Installation
4
16
 
5
17
  For now, you can install the envjs gem by installing Johnson:
6
18
 
7
19
  gem install johnson --prerelease
8
20
 
9
- (You'll need to manually install any prerequisites it asks for) and then installing the envjs gem with
21
+ and then installing the envjs gem with
10
22
 
11
23
  gem install envjs
12
24
 
25
+ == Using envjs interactively
26
+
13
27
  The envjs gem provides the envjsrb command, which functions as an extended version of the Johnson javascript shell. For example:
14
28
 
15
29
  mbp:env-js smparkes$ envjsrb
@@ -21,6 +35,8 @@ js> document.innerHTML
21
35
  => "<html><head><title></title></head><body></body></html>"
22
36
  js>
23
37
 
38
+ == Embedding envjs
39
+
24
40
  It's also possible to embed the envjs interpreter similar to the way it's done in Johnson, e.g.,
25
41
 
26
42
  require 'rubygems' # if necessary
@@ -36,4 +52,9 @@ envjs.wait
36
52
 
37
53
  You need the Runtime#wait at the end to give env.js's event loop a chance to execute queued events and timers. You may need to do this at other times as well, depending on the asynchronous nature of your application.
38
54
 
39
- Comments to http://groups.google.com/group/envjs or #envjs on freenode.
55
+ == License
56
+
57
+ See
58
+ http://github.com/smparkes/env-js/blob/envjsrb/licenses/MIT-LICENSE.txt
59
+ and
60
+ http://github.com/smparkes/env-js/blob/envjsrb/licenses/GPL-LICENSE.txt.
data/Rakefile ADDED
@@ -0,0 +1,196 @@
1
+ require 'rubygems'
2
+
3
+ gem 'hoe', '>= 2.5'
4
+ require 'hoe'
5
+
6
+ Hoe.plugin :debugging, :doofus, :git
7
+ Hoe.plugins.delete :rubyforge
8
+
9
+ Hoe.spec "envjs" do
10
+
11
+ developer 'John Resig', 'jeresig@gmail.com'
12
+ developer 'Chris Thatcher', 'thatcher.christopher@gmail.com'
13
+ developer 'Steven Parkes', 'smparkes@smparkes.net'
14
+
15
+ self.readme_file = 'README.rdoc'
16
+ self.extra_rdoc_files = Dir['*.rdoc']
17
+ self.history_file = "CHANGELOG.rdoc"
18
+ self.readme_file = "README.rdoc"
19
+
20
+ self.extra_deps = [
21
+ ['johnson', '>= 2.0.0.pre3']
22
+ ]
23
+
24
+ end
25
+
26
+ # task :test => :check_dependencies
27
+
28
+ namespace :gemspec do
29
+ task :generate => "johnson:compile"
30
+ end
31
+
32
+ task :default => :test
33
+
34
+ namespace :rhino do
35
+ desc "run tests aginst rhino"
36
+ task :test do
37
+ classpath = [
38
+ File.join(".", "rhino", "ant.jar"),
39
+ File.join(".", "rhino", "ant-launcher.jar")
40
+ ].join(File::PATH_SEPARATOR)
41
+ exec "java -cp #{classpath} org.apache.tools.ant.Main -emacs all"
42
+ end
43
+ end
44
+
45
+ namespace :johnson do
46
+
47
+ desc "create a file that loads the individual source files"
48
+ task :load
49
+
50
+ desc "compile johnson files into a single js file"
51
+ task :compile do
52
+ require 'rexml/document'
53
+ include REXML
54
+ doc = Document.new( File.new( "build.xml" ) ).root
55
+ groups = {}
56
+ XPath.each( doc, "//concat" ) do |concat|
57
+ name = concat.attributes["destfile"]
58
+ files =
59
+ XPath.match( concat, "fileset/attribute::includes" ).
60
+ map { |a| a.value }
61
+ groups[name] = files
62
+ end
63
+
64
+ files = groups["${ENV_RHINO}"];
65
+ files.map! { |f| f == "env.js" ? groups["${ENV_DIST}"] : f }.flatten!
66
+ files.map! { |f| f.sub!( "rhino", "johnson" ); "src/" + f }
67
+
68
+ static = [
69
+ "src/platform/static/intro.js",
70
+ "src/base64.js",
71
+ "src/dom/nodelist.js",
72
+ "src/dom/namednodemap.js",
73
+ "src/dom/node.js",
74
+ "src/dom/namespace.js",
75
+ "src/dom/characterdata.js",
76
+ "src/dom/text.js",
77
+ "src/dom/cdatasection.js",
78
+ "src/dom/comment.js",
79
+ "src/dom/doctype.js",
80
+ "src/dom/attr.js",
81
+ "src/dom/element.js",
82
+ "src/dom/exception.js",
83
+ "src/dom/fragment.js",
84
+ "src/dom/instruction.js",
85
+ "src/dom/parser.js",
86
+ "src/dom/entities.js",
87
+ # "src/dom/implementation.js",
88
+ "src/dom/document.js",
89
+ "src/html/html.js",
90
+ "src/html/document.js",
91
+ "src/html/element.js",
92
+ "src/html/collection.js",
93
+ "src/html/input-elements.js",
94
+ "src/html/a.js",
95
+ "src/html/anchor.js",
96
+ "src/html/area.js",
97
+ "src/html/base.js",
98
+ "src/html/blockquote-q.js",
99
+ "src/html/body.js",
100
+ "src/html/button.js",
101
+ "src/html/col-colgroup.js",
102
+ "src/html/del-ins.js",
103
+ "src/html/div.js",
104
+ "src/html/legend.js",
105
+ "src/html/fieldset.js",
106
+ "src/html/form.js",
107
+ "src/html/frame.js",
108
+ "src/html/frameset.js",
109
+ "src/html/head.js",
110
+ "src/html/iframe.js",
111
+ "src/html/img.js",
112
+ "src/html/input.js",
113
+ "src/html/label.js",
114
+ "src/html/link.js",
115
+ "src/html/map.js",
116
+ "src/html/meta.js",
117
+ "src/html/object.js",
118
+ "src/html/optgroup.js",
119
+ "src/html/option.js",
120
+ "src/html/param.js",
121
+ "src/html/script.js",
122
+ "src/html/select.js",
123
+ "src/html/style.js",
124
+ "src/html/table.js",
125
+ "src/html/tbody-thead-tfoot.js",
126
+ "src/html/td-th.js",
127
+ "src/html/textarea.js",
128
+ "src/html/title.js",
129
+ "src/html/tr.js",
130
+ "src/svg/document.js",
131
+ "src/svg/element.js",
132
+ "src/svg/animatedstring.js",
133
+ "src/svg/stylable.js",
134
+ "src/svg/rect.js",
135
+ "src/svg/locatable.js",
136
+ "src/svg/transformable.js",
137
+ "src/svg/svgelement.js",
138
+ "src/svg/rectelement.js",
139
+ "src/parser/intro.js",
140
+ "src/parser/html5.pretty.js",
141
+ "src/parser/outro.js",
142
+ "src/xpath/xmltoken.js",
143
+ "src/xpath/expression.js",
144
+ "src/xpath/result.js",
145
+ "src/xpath/implementation.js",
146
+ "src/xpath/util.js",
147
+ "src/serializer/xml.js",
148
+ "src/event/event.js",
149
+ "src/event/mouseevent.js",
150
+ "src/event/uievent.js",
151
+ "src/css/properties.js",
152
+ "src/css/rule.js",
153
+ "src/css/stylesheet.js",
154
+ "src/html/cookie.js",
155
+ "src/platform/static/outro.js"
156
+ ]
157
+ _static = [
158
+ "src/platform/static/intro.js",
159
+ "src/dom/node.js",
160
+ "src/platform/static/outro.js"
161
+ ]
162
+
163
+ files.reject! { |f| static.include? f }
164
+
165
+ # puts files.join(" ")
166
+
167
+ system "rm -f lib/envjs/env.js"
168
+ system "cat #{files.join(' ')} > lib/envjs/env.js"
169
+ system "chmod 444 lib/envjs/env.js"
170
+
171
+ system "rm -f lib/envjs/static.js.tmp"
172
+ system "cat /dev/null > lib/envjs/static.js.tmp"
173
+ static.each do |f|
174
+ system "cat #{f} >> lib/envjs/static.js.tmp; echo >> lib/envjs/static.js.tmp"
175
+ end
176
+ system "chmod 444 lib/envjs/static.js.tmp"
177
+ system "mv -f lib/envjs/static.js.tmp lib/envjs/static.js"
178
+
179
+ end
180
+
181
+ desc "run tests against johnson"
182
+ task :test => :compile do
183
+ ruby "-Ilib bin/envjsrb test/primary-tests.js"
184
+ ruby "-Ilib bin/envjsrb test/prototype-test.js"
185
+ ruby "-Ilib bin/envjsrb test/call-load-test.js"
186
+ end
187
+
188
+ end
189
+
190
+ desc "run tests on all platforms"
191
+ # task :test => "rhino:test"
192
+ task :test => "johnson:test"
193
+
194
+ # Local Variables:
195
+ # mode:ruby
196
+ # End:
data/Wakefile ADDED
@@ -0,0 +1,24 @@
1
+ begin; require 'wake/event_handlers/em'; rescue LoadError; end
2
+ begin; require 'wake/deps'; rescue LoadError; end
3
+
4
+ watch( %r(.*), :modified, lambda { |md| File.directory? md[0] } ) do |md|
5
+ File.directory? md[0] and raise Wake::Refresh
6
+ end
7
+
8
+ watch( %r(env-js.wake), :modified ) do |md|
9
+ raise Wake::Refresh
10
+ end
11
+
12
+ watch( %r((^src/.*)\.js$), [:load, :created, :modified], nil, :batch => :js ) do
13
+ cmd = "rake johnson:compile"
14
+ puts cmd
15
+ system cmd
16
+ end
17
+
18
+ Signal.trap('QUIT') do
19
+ EM.stop
20
+ end
21
+
22
+ # Local Variables:
23
+ # mode:ruby
24
+ # End:
data/build.properties ADDED
@@ -0,0 +1,9 @@
1
+
2
+ PROJECT: env-js
3
+ BUILD_MAJOR: 1
4
+ BUILD_MINOR: 1
5
+ BUILD_ID: rc2
6
+ BUILD: ${PROJECT}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}
7
+ VERSION: ${BUILD} ${DSTAMP}
8
+
9
+
data/build.xml ADDED
@@ -0,0 +1,247 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project name="Env" default="all" basedir=".">
3
+ <description>Builds, tests, and runs the project Env.</description>
4
+ <tstamp/>
5
+
6
+ <property name="SRC_DIR"
7
+ location="src"
8
+ description="Source Folder"/>
9
+ <property name="TOOLS_DIR"
10
+ location="tools"
11
+ description="Files for parsing etc." />
12
+ <property name="RHINO_JAR"
13
+ location="rhino/js.jar"
14
+ description="Rhino JS Engine"/>
15
+
16
+ <property name="PREFIX"
17
+ location="${basedir}/dist/"
18
+ description="Target parent folder for built files" />
19
+ <property name="DOCS_DIR"
20
+ location="${PREFIX}/docs"
21
+ description="Folder for docs target" />
22
+ <property name="TEST_DIR"
23
+ location="${PREFIX}/test"
24
+ description="Folder for test target" />
25
+ <property name="DIST_DIR"
26
+ location="${PREFIX}/"
27
+ description="Folder for concatenated, min, lite and packed target" />
28
+
29
+
30
+ <property file="build.properties"/>
31
+
32
+ <!-- Files names for distribution -->
33
+ <property name="ENV_DIST"
34
+ location="${DIST_DIR}/env.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}.js" />
35
+ <property name="ENV_RHINO"
36
+ location="${DIST_DIR}/env.rhino.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}.js"/>
37
+ <property name="ENV_LATEST_DIST"
38
+ location="${DIST_DIR}/env.js" />
39
+ <property name="ENV_LATEST_RHINO"
40
+ location="${DIST_DIR}/env.rhino.js"/>
41
+
42
+ <!-- BUILD TARGETS -->
43
+ <target name="all" depends="concat,test"/>
44
+ <target name="rhino">
45
+ <ant antfile="rhino/build.xml" target="all" inheritAll="false"/>
46
+ </target>
47
+
48
+ <target name="concat" description="Main ENV build">
49
+ <mkdir dir="${DIST_DIR}" />
50
+ <!-- CORE -->
51
+ <echo message="Building ${ENV_DIST}" />
52
+ <concat destfile="${ENV_DIST}">
53
+ <filterchain>
54
+ <replacetokens>
55
+ <token key="VERSION" value="${BUILD}"/>
56
+ </replacetokens>
57
+ </filterchain>
58
+ <!--
59
+ <fileset dir="${SRC_DIR}" includes="build.js" />
60
+ <fileset dir="${SRC_DIR}" includes="intro.js" />
61
+ -->
62
+ <fileset dir="${SRC_DIR}" includes="base64.js" />
63
+ <fileset dir="${SRC_DIR}" includes="window/window.js" />
64
+ <fileset dir="${SRC_DIR}" includes="dom/nodelist.js" />
65
+ <fileset dir="${SRC_DIR}" includes="dom/namednodemap.js" />
66
+ <fileset dir="${SRC_DIR}" includes="dom/node.js" />
67
+ <fileset dir="${SRC_DIR}" includes="dom/namespace.js" />
68
+ <fileset dir="${SRC_DIR}" includes="dom/characterdata.js" />
69
+ <fileset dir="${SRC_DIR}" includes="dom/text.js" />
70
+ <fileset dir="${SRC_DIR}" includes="dom/cdatasection.js" />
71
+ <fileset dir="${SRC_DIR}" includes="dom/comment.js" />
72
+ <fileset dir="${SRC_DIR}" includes="dom/doctype.js" />
73
+ <fileset dir="${SRC_DIR}" includes="dom/attr.js" />
74
+ <fileset dir="${SRC_DIR}" includes="dom/element.js" />
75
+ <fileset dir="${SRC_DIR}" includes="dom/exception.js" />
76
+ <fileset dir="${SRC_DIR}" includes="dom/fragment.js" />
77
+ <fileset dir="${SRC_DIR}" includes="dom/instruction.js" />
78
+ <fileset dir="${SRC_DIR}" includes="dom/parser.js" />
79
+ <fileset dir="${SRC_DIR}" includes="dom/entities.js" />
80
+ <fileset dir="${SRC_DIR}" includes="dom/implementation.js" />
81
+ <fileset dir="${SRC_DIR}" includes="dom/document.js" />
82
+ <fileset dir="${SRC_DIR}" includes="html/html.js" />
83
+ <fileset dir="${SRC_DIR}" includes="html/document.js" />
84
+ <fileset dir="${SRC_DIR}" includes="html/element.js" />
85
+ <fileset dir="${SRC_DIR}" includes="html/collection.js" />
86
+ <fileset dir="${SRC_DIR}" includes="html/input-elements.js" />
87
+ <!-- in alpha order, EXCEPT for dependencies -->
88
+ <fileset dir="${SRC_DIR}" includes="html/a.js" />
89
+ <fileset dir="${SRC_DIR}" includes="html/anchor.js" />
90
+ <fileset dir="${SRC_DIR}" includes="html/area.js" />
91
+ <fileset dir="${SRC_DIR}" includes="html/base.js" />
92
+ <fileset dir="${SRC_DIR}" includes="html/blockquote-q.js" />
93
+ <fileset dir="${SRC_DIR}" includes="html/body.js" />
94
+ <fileset dir="${SRC_DIR}" includes="html/button.js" />
95
+ <fileset dir="${SRC_DIR}" includes="html/col-colgroup.js" />
96
+ <fileset dir="${SRC_DIR}" includes="html/del-ins.js" />
97
+ <fileset dir="${SRC_DIR}" includes="html/div.js" />
98
+ <fileset dir="${SRC_DIR}" includes="html/legend.js" />
99
+ <fileset dir="${SRC_DIR}" includes="html/fieldset.js" />
100
+ <fileset dir="${SRC_DIR}" includes="html/form.js" />
101
+ <fileset dir="${SRC_DIR}" includes="html/frame.js" />
102
+ <fileset dir="${SRC_DIR}" includes="html/frameset.js" />
103
+ <fileset dir="${SRC_DIR}" includes="html/head.js" />
104
+ <fileset dir="${SRC_DIR}" includes="html/iframe.js" />
105
+ <fileset dir="${SRC_DIR}" includes="html/image.js" />
106
+ <fileset dir="${SRC_DIR}" includes="html/img.js" />
107
+ <fileset dir="${SRC_DIR}" includes="html/input.js" />
108
+ <fileset dir="${SRC_DIR}" includes="html/label.js" />
109
+ <fileset dir="${SRC_DIR}" includes="html/link.js" />
110
+ <fileset dir="${SRC_DIR}" includes="html/map.js" />
111
+ <fileset dir="${SRC_DIR}" includes="html/meta.js" />
112
+ <fileset dir="${SRC_DIR}" includes="html/object.js" />
113
+ <fileset dir="${SRC_DIR}" includes="html/optgroup.js" />
114
+ <fileset dir="${SRC_DIR}" includes="html/option.js" />
115
+ <fileset dir="${SRC_DIR}" includes="html/param.js" />
116
+ <fileset dir="${SRC_DIR}" includes="html/script.js" />
117
+ <fileset dir="${SRC_DIR}" includes="html/select.js" />
118
+ <fileset dir="${SRC_DIR}" includes="html/style.js" />
119
+ <fileset dir="${SRC_DIR}" includes="html/table.js" />
120
+ <fileset dir="${SRC_DIR}" includes="html/tbody-thead-tfoot.js" />
121
+ <fileset dir="${SRC_DIR}" includes="html/td-th.js" />
122
+ <fileset dir="${SRC_DIR}" includes="html/textarea.js" />
123
+ <fileset dir="${SRC_DIR}" includes="html/title.js" />
124
+ <fileset dir="${SRC_DIR}" includes="html/tr.js" />
125
+
126
+ <fileset dir="${SRC_DIR}" includes="svg/document.js" />
127
+ <fileset dir="${SRC_DIR}" includes="svg/element.js" />
128
+ <fileset dir="${SRC_DIR}" includes="svg/animatedstring.js" />
129
+ <fileset dir="${SRC_DIR}" includes="svg/stylable.js" />
130
+ <fileset dir="${SRC_DIR}" includes="svg/rect.js" />
131
+ <fileset dir="${SRC_DIR}" includes="svg/locatable.js" />
132
+ <fileset dir="${SRC_DIR}" includes="svg/transformable.js" />
133
+ <fileset dir="${SRC_DIR}" includes="svg/svgelement.js" />
134
+ <fileset dir="${SRC_DIR}" includes="svg/rectelement.js" />
135
+
136
+ <fileset dir="${SRC_DIR}" includes="serializer/xml.js" />
137
+ <fileset dir="${SRC_DIR}" includes="xpath/xmltoken.js" />
138
+ <fileset dir="${SRC_DIR}" includes="xpath/expression.js" />
139
+ <fileset dir="${SRC_DIR}" includes="xpath/result.js" />
140
+ <fileset dir="${SRC_DIR}" includes="xpath/implementation.js" />
141
+ <fileset dir="${SRC_DIR}" includes="xpath/util.js" />
142
+ <fileset dir="${SRC_DIR}" includes="event/event.js" />
143
+ <fileset dir="${SRC_DIR}" includes="event/mouseevent.js" />
144
+ <fileset dir="${SRC_DIR}" includes="event/uievent.js" />
145
+ <fileset dir="${SRC_DIR}" includes="css/properties.js" />
146
+ <fileset dir="${SRC_DIR}" includes="css/rule.js" />
147
+ <fileset dir="${SRC_DIR}" includes="css/stylesheet.js" />
148
+ <fileset dir="${SRC_DIR}" includes="window/location.js" />
149
+ <fileset dir="${SRC_DIR}" includes="window/history.js" />
150
+ <fileset dir="${SRC_DIR}" includes="window/navigator.js" />
151
+ <fileset dir="${SRC_DIR}" includes="window/timer.js" />
152
+ <fileset dir="${SRC_DIR}" includes="window/event.js" />
153
+ <fileset dir="${SRC_DIR}" includes="window/xhr.js" />
154
+ <fileset dir="${SRC_DIR}" includes="window/css.js" />
155
+ <fileset dir="${SRC_DIR}" includes="window/screen.js" />
156
+ <fileset dir="${SRC_DIR}" includes="window/dialog.js" />
157
+ <!--
158
+ <fileset dir="${SRC_DIR}" includes="profile/aop.js" />
159
+ <fileset dir="${SRC_DIR}" includes="profile/profile.js" />
160
+ -->
161
+ <fileset dir="${SRC_DIR}" includes="window/document.js" />
162
+ <fileset dir="${SRC_DIR}" includes="html/cookie.js" />
163
+ <fileset dir="${SRC_DIR}" includes="parser/intro.js" />
164
+ <!-- <fileset dir="${SRC_DIR}" includes="parser/html5.min.js" /> needs update from thatcher -->
165
+ <fileset dir="${SRC_DIR}" includes="parser/html5.pretty.js" />
166
+ <fileset dir="${SRC_DIR}" includes="parser/outro.js" />
167
+ </concat>
168
+ <echo message="${ENV_DIST} built." />
169
+ <copy tofile="${ENV_LATEST_DIST}" file="${ENV_DIST}"/>
170
+
171
+ <!-- RHINO -->
172
+ <echo message="Building ${ENV_RHINO}" />
173
+ <concat destfile="${ENV_RHINO}">
174
+ <filterchain>
175
+ <replacetokens>
176
+ <token key="VERSION" value="${BUILD}"/>
177
+ </replacetokens>
178
+ </filterchain>
179
+ <fileset dir="${DIST_DIR}" includes="build.js" />
180
+ <fileset dir="${DIST_DIR}" includes="intro.js" />
181
+ <fileset dir="${SRC_DIR}" includes="platform/rhino.js" />
182
+ <fileset dir="${SRC_DIR}" includes="platform/core.js" />
183
+ <fileset dir="${DIST_DIR}" includes="env.js" />
184
+ <fileset dir="${SRC_DIR}" includes="outro.js" />
185
+ </concat>
186
+ <echo message="${ENV_RHINO} built." />
187
+ <copy tofile="${ENV_LATEST_RHINO}" file="${ENV_RHINO}"/>
188
+ </target>
189
+
190
+ <target name="test" description="Run the tests">
191
+ <java fork="true" jar="${DIST_DIR}/env-js.jar" failonerror="true">
192
+ <arg value="-opt"/>
193
+ <arg value="-1"/>
194
+ <arg value="test/test.js"/>
195
+ <arg value="envjs"/>
196
+ <arg value="primary-tests"/>
197
+ <jvmarg value="-Dfile.encoding=utf-8"/>
198
+ <jvmarg value="-Xmx256m"/>
199
+ </java>
200
+ <java fork="true" jar="${DIST_DIR}/env-js.jar" failonerror="true">
201
+ <arg value="-opt"/>
202
+ <arg value="-1"/>
203
+ <arg value="test/test.js"/>
204
+ <arg value="envjs"/>
205
+ <arg value="call-load-test"/>
206
+ <jvmarg value="-Dfile.encoding=utf-8"/>
207
+ <jvmarg value="-Xmx256m"/>
208
+ </java>
209
+ <java fork="true" jar="${DIST_DIR}/env-js.jar" failonerror="true">
210
+ <arg value="-opt"/>
211
+ <arg value="-1"/>
212
+ <arg value="test/test.js"/>
213
+ <arg value="envjs"/>
214
+ <arg value="prototype-test"/>
215
+ <jvmarg value="-Dfile.encoding=utf-8"/>
216
+ <jvmarg value="-Xmx256m"/>
217
+ </java>
218
+ <java fork="true" jar="${RHINO_JAR}" failonerror="true">
219
+ <arg value="-opt"/>
220
+ <arg value="-1"/>
221
+ <arg value="test/test.js"/>
222
+ <arg value="rhino"/>
223
+ <arg value="primary-tests"/>
224
+ <jvmarg value="-Dfile.encoding=utf-8"/>
225
+ <jvmarg value="-Xmx256m"/>
226
+ </java>
227
+ <java fork="true" jar="${RHINO_JAR}" failonerror="true">
228
+ <arg value="-opt"/>
229
+ <arg value="-1"/>
230
+ <arg value="test/test.js"/>
231
+ <arg value="rhino"/>
232
+ <arg value="call-load-test"/>
233
+ <jvmarg value="-Dfile.encoding=utf-8"/>
234
+ <jvmarg value="-Xmx256m"/>
235
+ </java>
236
+ <java fork="true" jar="${RHINO_JAR}" failonerror="true">
237
+ <arg value="-opt"/>
238
+ <arg value="-1"/>
239
+ <arg value="test/test.js"/>
240
+ <arg value="rhino"/>
241
+ <arg value="prototype-test"/>
242
+ <jvmarg value="-Dfile.encoding=utf-8"/>
243
+ <jvmarg value="-Xmx256m"/>
244
+ </java>
245
+ </target>
246
+
247
+ </project>