-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
With Tuli now loading plugins correctly, a minor callback has been moved into its own plugin, Finish.hx.
- Loading branch information
Showing
10 changed files
with
140 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
-neko bin/haxeio.js | ||
-main Main | ||
--macro uhx.macro.KlasImp.initalize() | ||
-cmd "haxe plugins.hxml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-lib tuli | ||
-lib mo | ||
-lib detox | ||
-lib beanhx | ||
-lib tjson | ||
-lib selecthxml | ||
-debug | ||
#-dce no | ||
-cp src | ||
|
||
--each | ||
|
||
-neko finish.n | ||
-main Finish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package ; | ||
|
||
import sys.io.File; | ||
import uhx.sys.Tuli; | ||
|
||
using Detox; | ||
using StringTools; | ||
using haxe.io.Path; | ||
using sys.FileSystem; | ||
|
||
/** | ||
* ... | ||
* @author Skial Bainn | ||
*/ | ||
class Finish { | ||
|
||
private static var files:Array<String> = []; | ||
|
||
public static function main() return Finish; | ||
|
||
public function new(tuli:Class<Tuli>) { | ||
untyped Tuli = tuli; | ||
|
||
Tuli.onExtension( 'html', handler, After ); | ||
trace('adding fin after'); | ||
Tuli.onFinish( finish, After ); | ||
} | ||
|
||
public function handler(file:TuliFile, content:String) { | ||
files.push( file.path ); | ||
return content; | ||
} | ||
|
||
public function finish() { | ||
for (file in files) if (Tuli.fileCache.exists( file )) { | ||
var c = Tuli.fileCache.get(file); | ||
while (c.indexOf('&') > -1) { | ||
c = c.replace('&', '&'); | ||
} | ||
// HTML5 tidy application during html=>xml conversion | ||
// wraps javascript wrapped in <script> tags with CDATA. | ||
// Adding type="text/javascript" seems to force the CDATA | ||
// to be commented out. | ||
/*while (c.indexOf('<![CDATA[') > -1) { | ||
c = c.replace('<![CDATA[', ''); | ||
} | ||
while (c.indexOf(']]>') > -1) { | ||
c = c.replace(']]>', ''); | ||
}*/ | ||
|
||
Tuli.fileCache.set( file, c ); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<entry> | ||
<id></id> | ||
<title></title> | ||
<published></published> | ||
<updated></updated> | ||
<author> | ||
<name>Skial Bainn</name> | ||
</author> | ||
<summary></summary> | ||
<content></content> | ||
</entry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<item> | ||
<title></title> | ||
<description></description> | ||
<link></link> | ||
<guid></guid> | ||
<pubDate></pubDate> | ||
</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<feed xmlns="http://www.w3.org/2005/Atom"> | ||
<id>http://haxe.io/</id> | ||
<title>Haxe.io — News And Information For Haxe Developers</title> | ||
<updated></updated> | ||
<link rel="self" href="" /> | ||
<author> | ||
<name>Skial Bainn</name> | ||
<uri>http://twitter.com/skial</uri> | ||
</author> | ||
</feed> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
<channel> | ||
<title>Haxe News and Resources</title> | ||
<description>Haxe.io — News And Information For Haxe Developers</description> | ||
<link>http://haxe.io/</link> | ||
<language>en-gb</language> | ||
<pubDate></pubDate> | ||
<lastBuildDate></lastBuildDate> | ||
<ttl>1440</ttl> | ||
<atom:link href="" rel="self" type="application/rss+xml" /> | ||
</channel> | ||
</rss> |