Skip to content
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

Cleanup after server and build commands. #444

Merged
merged 1 commit into from
Apr 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Use configuration from `config/environments.js` to pass options to `Ember.Application.create`. ([#370](https://github.com/stefanpenner/ember-cli/pull/370))
* Adds `ic-ajax` to the list of ignored modules for tests([#378](https://github.com/stefanpenner/ember-cli/pull/378))
* Adds per command help output ([#376](https://github.com/stefanpenner/ember-cli/pull/376))
* Ensures that the broccoli trees are cleaned up properly. ([#444](https://github.com/stefanpenner/ember-cli/pull/444))

### 0.0.23

Expand Down
3 changes: 3 additions & 0 deletions lib/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ module.exports = new Task({
ui.write('File: ' + err.file + '\n');
}
ui.write(err.stack);
})
.finally(function() {
builder.cleanup();
});
}
});
14 changes: 14 additions & 0 deletions lib/tasks/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ module.exports = new Task({
builder: builder
});

process.addListener('exit', function () {
builder.cleanup()
})

// We register these so the 'exit' handler removing temp dirs is called
process.on('SIGINT', function () {
process.exit(1)
})
process.on('SIGTERM', function () {
process.exit(1)
})



options = assign({}, options, { watcher: watcher });

return Promise.all([
Expand Down