Skip to content

Commit

Permalink
Merge pull request #2360 from boltdesignsystem/feature/cli-cleanup
Browse files Browse the repository at this point in the history
Feat: Clean up Bolt intro CLI output
  • Loading branch information
colbytcook committed Oct 19, 2021
2 parents 1fd339c + ddbee7f commit 4e5ae06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 46 deletions.
20 changes: 1 addition & 19 deletions packages/build-tools/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const configStore = require('@bolt/build-utils/config-store');
const log = require('@bolt/build-utils/log');
const { readYamlFileSync } = require('@bolt/build-utils/yaml');
const { getPort } = require('@bolt/build-utils/get-port');
const boxen = require('boxen');
const chalk = require('chalk');

const configSchema = readYamlFileSync(
Expand Down Expand Up @@ -151,26 +150,9 @@ program
const defaultConfigLog = chalk.white(`
Logging Verbosity: ${config.verbosity}
Environment: ${config.prod ? 'Production' : 'Development'}
Multi-lang: ${config.i18n}
`);

console.log(
boxen(defaultConfigLog, {
padding: {
top: 0,
bottom: 0,
left: 3,
right: 3,
},
margin: {
top: 1,
bottom: 0,
left: 1,
right: 1,
},
borderStyle: 'double',
}),
);
console.log(defaultConfigLog);

// @todo: re-enable once JS-based SSR gets re-enabled and ships
// log.dim(
Expand Down
1 change: 0 additions & 1 deletion packages/build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"autoprefixer": "^9.7.4",
"babel-loader": "^8.0.6",
"better-opn": "^1.0.0",
"boxen": "^4.2.0",
"browser-sync": "^2.26.7",
"cacache": "^14.0.0",
"cache-loader": "^4.1.0",
Expand Down
31 changes: 5 additions & 26 deletions packages/build-tools/utils/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,38 +102,17 @@ Task Done: ${task}
}

/**
* Displays big Bolt intro ASCII art
* Displays Bolt usage notes
*/
function intro() {
// @TODO: How best to pull in .scss color data export to reference branch colors below?
const i = chalk.hex('#545DA6'); // indigo, light
const y = chalk.hex('#ffcc4d'); // yellow, base
const o = chalk.hex('#E84B17');
const t = chalk.hex('#009999');
const w = chalk.hex('#FFFFFF');

const CLI_TITLE = chalk.bold.underline('Bolt Design System CLI');
const CLI_USAGE = 'Usage: `bolt <command> [options ...]`';
const HELP_USAGE = 'Help: `bolt -h` or `bolt <command> --help`';

const HELP_HEADER = `
${o('__________')}${y('___________')}
${o('/ttttttt|')} ${y('|BCCCCCCCL;\\')}
${o('/;ttttttt|')} ${y('|CCCCCCCCLi.\\')}
${o('/,iiiiiiii|')} ${y('|11111111111:\\')}
${o('/_______')} ${y('_________')} ${w('_______\\')}
${o('/,1ttttt|')} ${y('|fCCCCCCCC|')} ${w('|C0000C:\\')} ${CLI_TITLE}
${o('/:ttttttt|')} ${y('|fCCCCCCCC|')} ${w('|888888Gi\\')}
${o('/:::::::::|')} ${y('|;;;;;;;;;|')} ${w('|11111111i\\')} ${CLI_USAGE}
${i('\\:;;;;;;;;;;;|')} ${t('|::::::::::::::::::/')} ${HELP_USAGE}
${i('\\:tfffffffff|')} ${t('|ttttttttttttttt1:/')}
${i('\\,1ffffffft|')} ${t('|tttttttttttttti,/')}
${i('\\¯¯¯¯¯¯¯¯¯¯')} ${t('¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯/')}
${i('\\,iiiiiiiiiiii|')} ${t('|iiiiiii1,/')}
${i('\\.;ffffffffff|')} ${t('|ttttttt;/')}
${i('\\:tfffffffff|')} ${t('|ttttt1:/')}
${i('¯¯¯¯¯¯¯¯¯¯¯¯')}${t('¯¯¯¯¯¯¯¯¯')}
`;
${CLI_TITLE}
${CLI_USAGE}
${HELP_USAGE}`;

info(HELP_HEADER);
}
Expand Down

0 comments on commit 4e5ae06

Please sign in to comment.