Skip to content

Commit

Permalink
refactor: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
luangjokaj committed Mar 30, 2021
1 parent 75265fa commit e878b30
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 26 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Luan Gjokaj - www.riangle.com
Copyright (c) Luan Gjokaj - www.riangle.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion installer/modules/clearConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
'use strict';

module.exports = () => {
process.stdout.write('win32' === process.platform ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H');
process.stdout.write(
'win32' === process.platform ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H'
);
};
4 changes: 2 additions & 2 deletions installer/modules/handleError.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/
'use strict';

module.exports = err => {
module.exports = (err) => {
if (err) {
console.log('ERROR: ' + err); // eslint-disable-line no-console
console.log('ERROR: ' + err);
}
};
50 changes: 29 additions & 21 deletions installer/modules/printNextSteps.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,66 @@
/**
* Prints next steps.
*
* @param {string} blockName The block name.
* @param {string} blockDir The block directory.
*/

const chalk = require('chalk');

module.exports = () => {
console.log('\n\nβœ… ', chalk.black.bgGreen(' All done! Happy coding. \n'));
console.log(
'Installer has added 🐺 GoPablo files to the current directory. ',
'\nInside this directory, you can run this command:',
'\nInside this directory, you can run this command:'
);

// Scripts.
// Scripts
console.log(
'\nπŸ‘‰ ',
' Type',
chalk.black.bgWhite(' npm run dev '),
'\n\n',
' Use to compile and run your files.',
'\n',
' Watches for any changes and reports back any errors in your code.',
' Watches for any changes and reports back any errors in your code.'
);

// Support.
// Support
console.log('\n✊ ', chalk.black.bgYellow(' Support GoPablo \n'));
console.log('Like GoPablo? Check out our other free and open source repositories: \n');
console.log(
'Like GoPablo? Check out our other free and open source repositories: \n'
);
console.log(
` ${chalk.yellow('Cherry β†’ ')} https://bit.ly/3sEr75P`,
'\n',
` ${chalk.gray('β€’ A design system to build the web.')}`,
'\n',
` ${chalk.yellow('GoPablo β†’ ')} http://bit.ly/2Hgkfpy`,
'\n',
` ${chalk.gray('β€’ Create optimized static websites.')}`,
'\n',
` ${chalk.yellow('WordPressify β†’ ')} https://bit.ly/2KTqyQX`,
'\n',
` ${chalk.gray('Development workflow for WordPress themes.')}`,
` ${chalk.gray('β€’ Automate your WordPress development workflow.')}`,
'\n',
` ${chalk.yellow('FuzzyMail β†’ ')} https://bit.ly/2P3Irlr`,
` ${chalk.yellow('Nextify β†’ ')} https://bit.ly/3m4lVWm`,
'\n',
` ${chalk.gray('Email template generator. Making emails fun again.')}`,
` ${chalk.gray('β€’ React apps using Next.js and Emotion.')}`,
'\n',
` ${chalk.yellow('ReactFondue β†’ ')} https://bit.ly/2OXgStR`,
` ${chalk.yellow('FuzzyMail β†’ ')} https://bit.ly/2P3Irlr`,
'\n',
` ${chalk.gray('SEO optimized React applications with SSR.')}`,
` ${chalk.gray('β€’ Responsive email template generator.')}`,
'\n',
` ${chalk.green('Powered by Riangle β†’ ')} https://bit.ly/2P5i26I`,
'\n',
'\n',
` ${chalk.red('Thank you for using 🐺 GoPablo β†’ ')} https://www.gopablo.co`,
` ${chalk.red('Thank you for using ⚑ Nextify β†’ ')} https://www.nextify.me`
);

// Get started.
// Get started
console.log('\n\n🎯 ', chalk.black.bgGreen(' Get Started β†’ \n'));
console.log(' You can start: \n');
console.log(
` ${chalk.dim('1.')} Editing your new website: ${chalk.green(`${process.cwd()}/src`)}`,
` ${chalk.dim('1.')} Editing your new website: ${chalk.green(
`${process.cwd()}/src`
)}`
);
console.log(
` ${chalk.dim('2.')} Running: ${chalk.green('npm')} run dev`,
'\n\n'
);
console.log(` ${chalk.dim('2.')} Running: ${chalk.green('npm')} run dev`, '\n\n');
process.exit();
};
1 change: 0 additions & 1 deletion installer/modules/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ module.exports = () => {

// The npm install
spinner.start('2. Installing npm packages...');
// await execa('npm', ['install', '--silent']);
await execa('npm', ['install']);
spinner.succeed();

Expand Down

0 comments on commit e878b30

Please sign in to comment.