Permalink
Browse files

fix(cli): no longer clear the terminal

  • Loading branch information...
JeroenVinke committed Mar 20, 2018
1 parent 9407c87 commit 9644da880fc0b8640e1be052d599dd8c36de4713
Showing with 2 additions and 13 deletions.
  1. +0 −8 lib/ui.js
  2. +1 −3 lib/workflow/activities/project-create.js
  3. +1 −2 lib/workflow/activities/project-install.js
@@ -113,8 +113,6 @@ exports.ConsoleUI = class {
}
displayLogo() {
this.clearScreen();
if (this.getWidth() < 50) {
return this.log('Aurelia CLI' + os.EOL);
}
@@ -125,12 +123,6 @@ exports.ConsoleUI = class {
console.log(logo.toString());
});
}
clearScreen() {
process.stdout.write('\x1Bc');
return Promise.resolve();
}
};
function includeOption(cliOptions, option) {
@@ -39,16 +39,14 @@ module.exports = class {
let project = context.state.project = new ProjectTemplate(model, this.options, this.ui);
return this.ui.clearScreen()
.then(() => this.ui.log(this.createProjectDescription(model)))
return this.ui.log(this.createProjectDescription(model))
.then(() => this.projectConfirmation(project))
.then(answer => {
if (answer.value === 'yes') {
let configurator = require(`../../commands/new/buildsystems/${model.bundler.id}`);
configurator(project, this.options);
return project.create(this.ui, this.options.hasFlag('here') ? undefined : process.cwd())
.then(() => this.ui.clearScreen())
.then(() => this.ui.log('Project structure created and configured.' + os.EOL))
.then(() => project.renderManualInstructions())
.then(() => context.next(this.nextActivity));
@@ -62,8 +62,7 @@ module.exports = class {
message += ' If you want to build your app for production, run <magenta><bold>au build --env prod</bold></magenta>. That\'s just about all there is to it. If you need help, simply run <magenta><bold>au help</bold></magenta>.';
return this.ui.clearScreen()
.then(() => this.ui.log(transform('<bgGreen><white><bold>Congratulations</bold></white></bgGreen>') + os.EOL + os.EOL))
return this.ui.log(transform('<bgGreen><white><bold>Congratulations</bold></white></bgGreen>') + os.EOL + os.EOL)
.then(() => this.ui.log(`Congratulations! Your Project "${project.model.name}" Has Been Created!` + os.EOL + os.EOL))
.then(() => project.renderManualInstructions())
.then(() => this.ui.log(createLines(transform(message), '', this.ui.getWidth())))

0 comments on commit 9644da8

Please sign in to comment.