mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-20 13:32:43 +08:00
23 lines
430 B
JavaScript
23 lines
430 B
JavaScript
'use strict';
|
|
|
|
const CoreObject = require('core-object');
|
|
|
|
class Task extends CoreObject {
|
|
run(/*options*/) {
|
|
throw new Error('Task needs to have run() defined.');
|
|
}
|
|
|
|
/**
|
|
* Interrupt comamd with an exit code
|
|
* Called when the process is interrupted from outside, e.g. CTRL+C or `process.kill()`
|
|
*
|
|
* @private
|
|
* @method onInterrupt
|
|
*/
|
|
onInterrupt() {
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
module.exports = Task;
|