File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 1
1
package php_minifier ;
2
2
3
- #if macro
4
- import haxe .macro .Compiler ;
5
- import haxe .macro .Context ;
6
3
import sys .io .File ;
7
4
import sys .ssl .Socket ;
8
5
9
6
/** Provides initialization macros. **/
10
7
abstract class Macro {
11
8
9
+ #if macro
12
10
/** Adds a shebang to the compiled file. **/
13
- public static function shebang (executable : String ) Context .onAfterGenerate (() -> {
14
- final path = Compiler .getOutput ();
11
+ public static function shebang (executable : String ) haxe.macro. Context .onAfterGenerate (() -> {
12
+ final path = haxe.macro. Compiler .getOutput ();
15
13
File .saveContent (path , ' #!/usr/bin/env $executable \n ${File .getContent (path )}' );
16
14
});
15
+ #end
17
16
18
17
/** Enables or disables the verification of peer certificates during SSL handshake. **/
19
18
public static function verifySslCerts (value : Bool ): Void
20
19
Socket .DEFAULT_VERIFY_CERT = value ;
21
20
}
22
- #end
Original file line number Diff line number Diff line change 1
1
package php_minifier ;
2
2
3
- #if macro
4
- import haxe .Json ;
5
- import haxe .macro .Context ;
6
- import sys .io .File ;
7
- #end
8
-
9
3
/** Information about the environment in which the current program is running. **/
10
4
abstract class Platform {
11
5
@@ -26,13 +20,13 @@ abstract class Platform {
26
20
27
21
/** Gets the name of the Haxe compilation target. **/
28
22
macro static function getHaxeTarget ()
29
- return macro $v {Context .definedValue (" target.name" )};
23
+ return macro $v {haxe.macro. Context .definedValue (" target.name" )};
30
24
31
25
/** Gets the version number of the Haxe compiler. **/
32
26
macro static function getHaxeVersion ()
33
- return macro $v {Context .definedValue (" haxe" )};
27
+ return macro $v {haxe.macro. Context .definedValue (" haxe" )};
34
28
35
29
/** Gets the package version of this program. **/
36
30
macro static function getPackageVersion ()
37
- return macro $v {Json .parse (File .getContent (" haxelib.json" )).version };
31
+ return macro $v {haxe. Json .parse (sys.io. File .getContent (" haxelib.json" )).version };
38
32
}
You can’t perform that action at this time.
0 commit comments