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
postBuild fails -- dist is empty #4247
Comments
I'm open to a new hook, maybe add another where @ember-cli/owners thoughts? |
Or maybe postOutput? postResult? For now, i've created a bash script to call ember build and then copy the files. It works, although i can no longer use the livereload goodness. |
@brianally You could do one other thing, which is working out for me.
|
@aaruna Thanks for the tip. It looks like that could work, although it seems somehow wrong to be copying from tmp. I think it would be better to access the final build (in dist) rather than one of potentially several copies under tmp. I understand the motivation for having a hook for before the files are moved, but do not agree with the decision to remove the actual "post build" hook. |
@brianally I agree with you. The issue exists. What I mentioned, was a workaround till the actual "post build" hook is introduced. |
This is a blocker for many who have |
@aaruna understood that it's a workaround. I meant only that it's not a great permanent solution, should anyone else suggest that it is. I should have been clearer. Thanks again for the symlink tip. I hadn't thought about that. |
…penner Added a new outputReady builder hook In #4027 the `postBuild` hook was re-ordered to appear before the `processBuildResult` step. This allowed you to do some work on the final tree before it was output to `dist`. This also meant there was no longer a hook which fired to do work after everything was copied to `dist`, which is something we're trying to do. This PR re-adds the old hook, fired after `processBuildResult`, but with a new name `postResult` (name was suggested in #4247). I'm open to changing the hook name if there are any better ideas. This should also resolve #4247
Using 0.2.7.
I have an addon that copies files from dist on postBuild. This has been working fine. Suddenly, (as in, I merely deleted a console.log() line) i'm getting the following error:
Looking through lib/models/builder.js, in build() i see that processAddonBuildSteps, which calls the addOn, is called before processBuildResult, which copies files to dist. Has this changed recently? I can see how it could potentially work out ok, being promises. But i've noticed that, since upgrading, sometimes a build does not include changes just made, and i have to restart the server to generate a new build. Now that i'm getting this error it does seem that something is different about building in this version.
UPDATE: The order was changed May 6. I don't know how to properly link to this; apologies.
1ef8617
I can't say that i agree with the reasoning. If it's really worthwhile having a hook available after the build but before copying, then perhaps a new hook should be created. The docs for postBuild do say that it can be used as a hook for copying files. This is no longer the case.
The text was updated successfully, but these errors were encountered: