Skip to content

Commit

Permalink
Replace postBuild with outputReady hook
Browse files Browse the repository at this point in the history
Closes [#331].
Closes [#349].

According to the [addon hook documentation][hooks]:

`#postBuild`

> Gives access to the result of the tree, and the location of the output.

`#outputReady`

> Hook called after the build has been processed and the files have been
> copied to the output directory

Since we're now blocking until the `index.html` it built and in the
output directory, `outputReady` is the behavior we depend on.

[hooks]: https://github.com/ember-cli/ember-cli/blob/082d559757b3d6d186fc1c3cd1b7c2bb1ad10b3f/ADDON_HOOKS.md#outputready
[#331]: thoughtbot/ember-cli-rails#331
[#349]: thoughtbot/ember-cli-rails#349
  • Loading branch information
seanpdoyle committed Dec 11, 2015
1 parent 72ac7aa commit 98f05c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
master
------

* Wait until [outputReady] hook to remove lockfile.
* Remove dependency on `url-join` and `fs-extra` packages.
* Simplify inclusion logic thanks to removal of sprockets. [#25]

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
if(fs.existsSync(errorFile)) { fs.unlinkSync(errorFile); }
},

postBuild: function(result){
outputReady: function(result){
var lockFile = this.lockFilePath();

if(fs.existsSync(lockFile)) {
Expand Down

0 comments on commit 98f05c9

Please sign in to comment.