-
Notifications
You must be signed in to change notification settings - Fork 4
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
Generate files formatted by elm-format #50
Comments
I dug little bit deeper and the problem lies with the usage of So question is, what do you suggest to do in the meantime? Ignore that file while checking for the elm-format? Something different? |
as a workaround I have created adhoc webpack plugin, that is being run after the emit change and that runs const exec = require('child_process').exec;
....
, {
apply: (compiler) => {
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
exec('npm run format:travelm', (err, stdout, stderr) => {
if (stdout) process.stdout.write(stdout);
if (stderr) process.stderr.write(stderr);
});
});
} |
Ah that is actually a quite nice idea for a workaround. Until this is fixed in |
I now start elm-format as a child process in --stdin mode and pipe the generated Elm code through. |
This caused a regression - calling
|
A downside of the |
I've found the issue with |
Hey,
thanks for quite a nice tool to deal with translations. We are having small problem though. The generated output is not formatted according to elm-format format. It is a problem because we are using webpack plugin and it re-generates the translations elm module on each start of the app and creates wrong formatting. As we are checking whether everything is elm-formatted on the CI, this fails all the time if we don't notice it and reformat the output afterwards.
Do you plan to update the generated template so it adheres to the elm-format? 🙏
The format of comments is wrong in my case:
but elm-format hates those empty lines between
{|-....-}
so after reformatting it ends up like this:We are using elm-format version 0.8.4
The text was updated successfully, but these errors were encountered: