Closed fourst4r closed 7 months ago
I think this could be a bit cleaner, preferably ensureOutputDirExists
should be a bit purer and not direcly check options.fileOutputType
(?)
Could you give more detail to replicate this? What is output path being set to in the Okay this is definitely messed up. Lemme see if I can find a nicer way to fix this....hxml
: out
or out/main.dart
?
Okay, this (e9de25fe8e3d306b2a2988c44a830c9454d1593e) should fix this. In Reflaxe, I would like it so that no file extension = directory, so:
out=thing.ext -> thing.ext
out=thing -> thing/defaultFileName.ext
Sure, although directories are allowed to contain dots (at least on Windows), so technically there's no way to know for sure if the user means a dir or a file.
Ohhh that is a good point. I'll add another line that checks if the input is an existing directory 👌 Also guess it's about time I add some proper tests to this repo. 😅
This is what it was doing before: 1st compile: out/main.dart 2nd compile and beyond: out/out/main.dart
But should be working now.