mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
66f1ddcbe9
- run `slimer fix package.json` to add a files array everywhere - manually update slimer-cli to have a files array for bin - manually update slimer to include commands or else this will break!! - update pretty-cli to use our standard /lib/ pattern - this means we only publish what we need to npm, and keeps things cleaner and safer
31 lines
848 B
JavaScript
31 lines
848 B
JavaScript
const Api = require('sywac/api');
|
|
const styles = require('./styles');
|
|
const ui = require('./ui');
|
|
/**
|
|
* Pretty CLI
|
|
*
|
|
* A mini-module to style a sywac instance in a standard way
|
|
*/
|
|
|
|
// Exports a pre-configured version of sywac
|
|
module.exports = Api.get()
|
|
// Use help & version with short forms AND
|
|
// group them into a Global Options group to keep them separate from per-command options
|
|
.help('-h, --help', {group: 'Global Options:'})
|
|
.version('-v, --version', {group: 'Global Options:'})
|
|
// Load our style rules
|
|
.style(styles)
|
|
// Add some padding at the end
|
|
.epilogue(' ')
|
|
// If no command is passed, output the help menu
|
|
.showHelpByDefault();
|
|
|
|
// Expose a clean version, just in case
|
|
module.exports.Api = Api;
|
|
|
|
// Export the styles
|
|
module.exports.styles = styles;
|
|
|
|
// Export our ui tools
|
|
module.exports.ui = ui;
|