Skip to content

Commit

Permalink
fixed namespaces, added stub haxelib template and bundle scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Donaldson committed Jul 16, 2012
1 parent a343e8c commit 59e9a15
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
haxedoc.xml
*.zip
5 changes: 5 additions & 0 deletions bundle.sh
@@ -0,0 +1,5 @@
cd src;
haxe -js x.js --no-output -cp src -xml ../haxedoc.xml `ls js/phantomjs/*`
zip -r ../phantom.zip . ../haxelib.xml ../haxedoc.xml
cd -

7 changes: 7 additions & 0 deletions haxelib.xml
@@ -0,0 +1,7 @@
<project name="phantomjs" url="https://github.com/jdonaldson/phantomjs-hx" license="GPL">
<user name="jdonaldson"/>
<tag v="js"/>
<tag v="extern"/>
<description>Haxe externs for phantomjs</description>
<version name="1.6">Extern is up to date with phantomjs version 1.6</version>
</project>
2 changes: 1 addition & 1 deletion src/js/phantomjs/FileSystem.hx
Expand Up @@ -4,7 +4,7 @@ package js.phantomjs;
A set of API functions is available to access files and directories. They are
modelled after CommonJS Filesystem proposal.
**/
@:native("require('fs')");
@:native("require('fs')")
extern class FileSystem {
//Read-only properties

Expand Down
2 changes: 1 addition & 1 deletion src/js/phantomjs/StreamObject.hx
Expand Up @@ -3,7 +3,7 @@ package js.phantomjs;
/**
A stream object returned from the open() function
**/
class StreamObject{
extern class StreamObject{

/**
returns the content of the stream.
Expand Down
7 changes: 4 additions & 3 deletions src/js/phantomjs/WebServer.hx
@@ -1,5 +1,6 @@
import js.phantom.Request;
import js.phantom.Response;
package js.phantomjs;
import js.phantomjs.Request;
import js.phantomjs.Response;

/**
Starting from version 1.4, PhantomJS script can start a web server. The
Expand All @@ -14,7 +15,7 @@ import js.phantom.Response;
next versions.
**/
@:native("require('webserver')")
class WebServer {
extern class WebServer {
public static function create():WebServer;
public function listen(port:Int, cb:Request->Response->Void):Void;
}

0 comments on commit 59e9a15

Please sign in to comment.