File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -86,18 +86,25 @@ export default function openflPlugin() {
8686 const isServeCommand = ! config || config . command === "serve" ;
8787 const projectDir = path . dirname ( id ) ;
8888 const mode = isServeCommand ? "-debug" : "-release" ;
89- const templateDir = path . join (
90- "templates" ,
91- usesGenes ? "genes" : "default"
89+ const templateDir = path . resolve (
90+ import . meta . dirname ,
91+ path . join ( "templates" , usesGenes ? "genes" : "default" )
9292 ) ;
93+ if (
94+ ! fs . existsSync ( templateDir ) ||
95+ ! fs . statSync ( templateDir ) . isDirectory ( )
96+ ) {
97+ this . error ( "Cannot find Lime templates: " + templateDir ) ;
98+ return ;
99+ }
93100 const result = child_process . spawnSync ( "haxelib" , [
94101 "run" ,
95102 "lime" ,
96103 "build" ,
97104 id ,
98105 "html5" ,
99106 mode ,
100- `--template=${ path . resolve ( import . meta . dirname , templateDir ) } ` ,
107+ `--template=${ templateDir } ` ,
101108 ] ) ;
102109 const logger = createLogger ( "info" ) ;
103110 result . output . forEach ( ( line ) => {
You can’t perform that action at this time.
0 commit comments