MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / cleanup

Method cleanup

lib/models/builder.js:215–238  ·  view source on GitHub ↗

* Delegates to the `cleanup` method of the wrapped Broccoli builder. * * @private * @method cleanup * @return {Promise}

()

Source from the content-addressed store, hash-verified

213 * @return {Promise}
214 */
215 async cleanup() {
216 if (!this._cleanupStarted) {
217 this._cleanupStarted = true;
218 let ui = this.project.ui;
219 ui.startProgress('cleaning up');
220 ui.writeLine('cleaning up...');
221
222 // ensure any addon treeFor caches are reset
223 _resetTreeCache();
224
225 this._onProcessInterrupt.removeHandler(this._cleanup);
226
227 let node = heimdall.start({ name: 'Builder Cleanup' });
228 try {
229 await this.builder.cleanup();
230 } catch (error) {
231 ui.writeLine(chalk.red('Cleanup error.'));
232 ui.writeError(error);
233 } finally {
234 ui.stopProgress();
235 node.stop();
236 }
237 }
238 }
239
240 throwFormattedBroccoliError(err) {
241 // TODO fix ember-cli/console-ui to handle current broccoli broccoliPayload

Callers 4

runFunction · 0.95
runMethod · 0.95
onInterruptMethod · 0.45
onInterruptMethod · 0.45

Calls 2

_resetTreeCacheFunction · 0.85
startMethod · 0.45

Tested by

no test coverage detected