Skip to content

Commit

Permalink
fix(cli): no longer clear the terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenVinke committed Mar 20, 2018
1 parent 9407c87 commit 9644da8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
8 changes: 0 additions & 8 deletions lib/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ exports.ConsoleUI = class {
}

displayLogo() {
this.clearScreen();

if (this.getWidth() < 50) {
return this.log('Aurelia CLI' + os.EOL);
}
Expand All @@ -125,12 +123,6 @@ exports.ConsoleUI = class {
console.log(logo.toString());
});
}

clearScreen() {
process.stdout.write('\x1Bc');

return Promise.resolve();
}
};

function includeOption(cliOptions, option) {
Expand Down
4 changes: 1 addition & 3 deletions lib/workflow/activities/project-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 1 addition & 2 deletions lib/workflow/activities/project-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())))
Expand Down

0 comments on commit 9644da8

Please sign in to comment.