-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor build to use an hxml file #31
Comments
If we use a temporary file, and utilise an NPM like https://www.npmjs.com/package/tmp, we will need to take care to handle any relative paths. It might be easier to create a temporary hxml file in the same directory, and just be careful to clean it up. If the macro option works that would probably be cleanest though. |
I have missed something, or |
@aliokan no, the loader supports only a single JS output, and we need to replace the output target to generate a the file in a temporary location. In a single output, having |
Why it is needed to replace the Is it possible that haxe-loader parses the input hxml and figure out and use the output path from there? If the
build.hxml:
path.hxml:
|
@kevinresol the problem is that the HXML is usually also used for IDE autocomplete as-is, hence why it will usually have a @jasononeil for HXML the paths are relative to the working directory, not the HXML location, so we wouldn't even have to fix the paths (remember they become literally compiler arguments). |
Currently the build process parses the hxml file and generates arguments list for haxe compilation - this is verbose, doesn't scale well, and has subtle edge case issues (like
--macro
with quotes in them, see #28).Is it possible to use the hxml file as is?
It doesn't seem to be possible because we need to replace the JS output target and only a single
-js
is allowed - maybe using a macro could work? A macro could dynamically replace the output file without touching the hxmlOtherwise we could generate a temporary hxml file
It should include the original hxml content with just the JS output replaced. Other added arguments should still be added to the build command.
The text was updated successfully, but these errors were encountered: