@@ -57,62 +57,62 @@ class HaxeModules {
57
57
}
58
58
}
59
59
60
- final old = Sys .getCwd ();
61
- Sys .setCwd (cwd );
60
+ final old = Sys .getCwd ();
61
+ Sys .setCwd (cwd );
62
62
63
- function findModules (path : String ) {
64
- if (Path .extension (path ) == " hx" ) return Sys .println (path );
65
- if (! FileSystem .isDirectory (path )) return ;
63
+ function findModules (path : String ) {
64
+ if (Path .extension (path ) == " hx" ) return Sys .println (path );
65
+ if (! FileSystem .isDirectory (path )) return ;
66
66
67
- path = Path .addTrailingSlash (path );
68
- for (f in FileSystem .readDirectory (path )) findModules (path + f );
69
- }
67
+ path = Path .addTrailingSlash (path );
68
+ for (f in FileSystem .readDirectory (path )) findModules (path + f );
69
+ }
70
70
71
- function extractTargetStd (cp : String ): Array <String > {
72
- var path = FileSystem .fullPath (Path .isAbsolute (cp ) ? cp : Path .join ([cwd , cp ]));
73
- if (! path .startsWith (stdRoot )) return [cp , null ];
71
+ function extractTargetStd (cp : String ): Array <String > {
72
+ var path = FileSystem .fullPath (Path .isAbsolute (cp ) ? cp : Path .join ([cwd , cp ]));
73
+ if (! path .startsWith (stdRoot )) return [cp , null ];
74
74
75
- cp = path ; // Use resolved path for std
76
- var path = cp .substr (stdRoot .length );
77
- path = StringTools .replace (path , ' \\ ' , ' /' );
78
- while (path .charCodeAt (0 ) == ' /' .code ) path = path .substr (1 );
79
- return [cp , path .split (' /' ).shift ()];
80
- }
75
+ cp = path ; // Use resolved path for std
76
+ var path = cp .substr (stdRoot .length );
77
+ path = StringTools .replace (path , ' \\ ' , ' /' );
78
+ while (path .charCodeAt (0 ) == ' /' .code ) path = path .substr (1 );
79
+ return [cp , path .split (' /' ).shift ()];
80
+ }
81
81
82
- var ignoredTargets = [];
83
- if (target != null ) {
84
- if (target != " java" && target != " jvm" ) ignoredTargets = ignoredTargets .concat ([" java" , " jvm" ]);
85
- if (target != " cpp" && target != " cppia" ) ignoredTargets .push (" cpp" );
86
- if (target != " js" ) ignoredTargets .push (" js" );
87
- if (target != " hl" ) ignoredTargets .push (" hl" );
88
- if (target != " cs" ) ignoredTargets .push (" cs" );
89
- if (target != " lua" ) ignoredTargets .push (" lua" );
90
- if (target != " neko" ) ignoredTargets .push (" neko" );
91
- if (target != " php" ) ignoredTargets .push (" php" );
92
- if (target != " python" ) ignoredTargets .push (" python" );
93
- if (target != " swf" ) ignoredTargets .push (" flash" );
94
- }
82
+ var ignoredTargets = [];
83
+ if (target != null ) {
84
+ if (target != " java" && target != " jvm" ) ignoredTargets = ignoredTargets .concat ([" java" , " jvm" ]);
85
+ if (target != " cpp" && target != " cppia" ) ignoredTargets .push (" cpp" );
86
+ if (target != " js" ) ignoredTargets .push (" js" );
87
+ if (target != " hl" ) ignoredTargets .push (" hl" );
88
+ if (target != " cs" ) ignoredTargets .push (" cs" );
89
+ if (target != " lua" ) ignoredTargets .push (" lua" );
90
+ if (target != " neko" ) ignoredTargets .push (" neko" );
91
+ if (target != " php" ) ignoredTargets .push (" php" );
92
+ if (target != " python" ) ignoredTargets .push (" python" );
93
+ if (target != " swf" ) ignoredTargets .push (" flash" );
94
+ }
95
95
96
- for (cp in classpath ) {
97
- switch extractTargetStd (cp ) {
98
- // Non-std
99
- case [cp , null ]: findModules (cp );
100
-
101
- // Top level std
102
- case [cp , " " ]:
103
- cp = Path .addTrailingSlash (cp );
104
- var sub = FileSystem .readDirectory (cp );
105
- for (f in sub ) {
106
- if (ignoredTargets .contains (f )) continue ;
107
- findModules (cp + f );
108
- }
109
-
110
- case [_ , t ] if (ignoredTargets .contains (t )):
111
- case [cp , _ ]: findModules (cp );
112
- };
113
- }
96
+ for (cp in classpath ) {
97
+ switch extractTargetStd (cp ) {
98
+ // Non-std
99
+ case [cp , null ]: findModules (cp );
100
+
101
+ // Top level std
102
+ case [cp , " " ]:
103
+ cp = Path .addTrailingSlash (cp );
104
+ var sub = FileSystem .readDirectory (cp );
105
+ for (f in sub ) {
106
+ if (ignoredTargets .contains (f )) continue ;
107
+ findModules (cp + f );
108
+ }
109
+
110
+ case [_ , t ] if (ignoredTargets .contains (t )):
111
+ case [cp , _ ]: findModules (cp );
112
+ };
113
+ }
114
114
115
- Sys .setCwd (old );
115
+ Sys .setCwd (old );
116
116
} catch (e ) {
117
117
Utils .displayError (Std .string (e ));
118
118
proc .close ();
0 commit comments