Skip to content

Commit

Permalink
doc: include a docs site for githubpages
Browse files Browse the repository at this point in the history
Includes a vuepress setup for some better documentation
and user guides
  • Loading branch information
esatterwhite committed Mar 21, 2021
1 parent 43b10f8 commit abf1528
Show file tree
Hide file tree
Showing 46 changed files with 6,819 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ build/Release
node_modules
cli.js
*.vim

pnpm-lock.yaml
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# test
test/
docs/

# assets
assets/
Expand Down Expand Up @@ -32,3 +33,6 @@ node_modules
cli.js
*.save
.travis.yml
.github/
release.config.js
pnpm-lock.yaml
1 change: 1 addition & 0 deletions examples/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ module.exports = {
, flip: require('./flip')
, ui: require('./ui')
, password: require('./password-confirm')
, sub: require('./sub')
}
18 changes: 18 additions & 0 deletions examples/commands/sub/bub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict'

const cli = require('../../../')

module.exports = new cli.Command({
name: 'bub'
, description: 'sub bub'
, flags: {
ask: {
type: Boolean
, required: true
, description: 'do you like bub'
}
}
, async run(cmd, data) {
return 'bub'
}
})
22 changes: 22 additions & 0 deletions examples/commands/sub/hub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict'

const cli = require('../../../')

module.exports = new cli.Command({
name: 'hub'
, description: 'Do sub hub type things'
, usage: [
`${cli.colorize(cli.get('name'))} sub hub`
]
, flags: {
ask: {
'type': Boolean
, 'default': true
, 'description': 'do you like hub'
}
}
, async run(cmd, data) {
return 'hub'
}
})

20 changes: 20 additions & 0 deletions examples/commands/sub/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict'

const cli = require('../../../')
const name = cli.colorize(cli.get('name'))
module.exports = new cli.Command({
name: 'sub'
, description: 'Attempt subcommands'
, usage: [
`${name} sub <action>`
, `${name} sub hub`
, `${name} sub bub --no-ask`
]
, commands: [
require('./hub')
, require('./bub')
]
, async run() {
return this.usage
}
})
14 changes: 14 additions & 0 deletions gh-pages/.vuepress/components/homepage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<div class="container">
<header>
<Content slot-key="header"/>
</header>
<main>
<Content/>
</main>
<footer>
<Content slot-key="footer"/>
</footer>
</div>
</template>

48 changes: 48 additions & 0 deletions gh-pages/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use strict'

module.exports = {
title: 'Seeli'
, dest: 'docs'
, patterns: [
'**/*.md'
, '!node_modules'
, '!**/node_modules'
, '!**/examples/node_modules'
]
, description: 'The Object orientated, event driven interactive cli framework'
, configureWebpack: {
resolve: {
alias: {
'@alias': '/assets/img'
}
}
}
, themeConfig: {
logo: '/assets/img/seeli-logo.png',
}
, plugins: [
'@vuepress/plugin-back-to-top'
]
, head: [
]
, themeConfig: {
sidebar: 'auto'
, smoothScroll: true
, nextLinks: true
, prevLinks: true
, nav: [
{ text: 'Github', link: 'https://github.com/esatterwhite/node-seeli', target:'_self', rel:'' }
, { text: 'Getting Started', link: '/getting-started' }
, { text: 'Guides'
, items: [
{ text: 'Commands', link: '/guides/commands' }
, { text: 'Progress UI', link: '/guides/ui' }
, { text: 'Interactive Commands', link: '/guides/interactive' }
, { text: 'Plugins', link: '/guides/plugins' }
]
}
, { text: 'Changelog', link: '/changelog', target:'_self' }
]
}
}

5 changes: 5 additions & 0 deletions gh-pages/.vuepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict'

module.exports = {
extend: '@vuepress/theme-default'
}
17 changes: 17 additions & 0 deletions gh-pages/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar: false
---
Object orientated, event driven , **Interactive** CLI module. Seeli aims to give you the tools to compose
A command line interface the way you want it, and otherwise, stays out of your way.

![gif](https://raw.githubusercontent.com/esatterwhite/node-seeli/master/assets/seeli.gif "interactive mode")


### Features

* Interactive Commands
* Sub-Commands
* Asnyc Functions
* Evented flag hooks
* Integrated Progress Indicators
* Support for Ad-Hoc input prompting
Binary file added gh-pages/assets/img/guides/command-events.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gh-pages/assets/img/guides/ui-alerts.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gh-pages/assets/img/guides/ui-messages.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gh-pages/assets/img/guides/ui-progress.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gh-pages/assets/img/guides/ui-prompts.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gh-pages/assets/img/guides/ui-spinners.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gh-pages/assets/img/seeli-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gh-pages/assets/img/seeli-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
145 changes: 145 additions & 0 deletions gh-pages/assets/recordings/command-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# The configurations that used for the recording, feel free to edit them
config:

# Specify a command to be executed
# like `/bin/bash -l`, `ls`, or any other commands
# the default is bash for Linux
# or powershell.exe for Windows
command: bash -l

# Specify the current working directory path
# the default is the current working directory path
cwd: /home/esatterwhite

# Export additional ENV variables
env:
recording: true

# Explicitly set the number of columns
# or use `auto` to take the current
# number of columns of your shell
cols: 80

# Explicitly set the number of rows
# or use `auto` to take the current
# number of rows of your shell
rows: 10

# Amount of times to repeat GIF
# If value is -1, play once
# If value is 0, loop indefinitely
# If value is a positive number, loop n times
repeat: 0

# Quality
# 1 - 100
quality: 100

# Delay between frames in ms
# If the value is `auto` use the actual recording delays
frameDelay: auto

# Maximum delay between frames in ms
# Ignored if the `frameDelay` isn't set to `auto`
# Set to `auto` to prevent limiting the max idle time
maxIdleTime: 2000

# The surrounding frame box
# The `type` can be null, window, floating, or solid`
# To hide the title use the value null
# Don't forget to add a backgroundColor style with a null as type
frameBox:
type: floating
title: Command Events
style:
border: 0px black solid
boxShadow: none
margin: 0px

# Add a watermark image to the rendered gif
# You need to specify an absolute path for
# the image on your machine or a URL, and you can also
# add your own CSS styles
watermark:
imagePath: null
style:
position: absolute
right: 15px
bottom: 15px
width: 100px
opacity: 0.9

# Cursor style can be one of
# `block`, `underline`, or `bar`
cursorStyle: block

# Font family
# You can use any font that is installed on your machine
# in CSS-like syntax
fontFamily: "Inconsalata, Monaco, Lucida Console, Ubuntu Mono, Monospace"

# The size of the font
fontSize: 20

# The height of lines
lineHeight: 1

# The spacing between letters
letterSpacing: 0

# Theme
theme:
background: "transparent"
foreground: "#afafaf"
cursor: "#c7c7c7"
black: "#232628"
red: "#fc4384"
green: "#b3e33b"
yellow: "#ffa727"
blue: "#75dff2"
magenta: "#ae89fe"
cyan: "#708387"
white: "#d5d5d0"
brightBlack: "#626566"
brightRed: "#ff7fac"
brightGreen: "#c8ed71"
brightYellow: "#ebdf86"
brightBlue: "#75dff2"
brightMagenta: "#ae89fe"
brightCyan: "#b1c6ca"
brightWhite: "#f9f9f4"

# Records, feel free to edit them
records:
- delay: 629
content: "\e[H\e[2J\e[01;32m$\e[00m "
- delay: 1292
content: s
- delay: 344
content: e
- delay: 180
content: e
- delay: 229
content: l
- delay: 318
content: i
- delay: 765
content: ' '
- delay: 337
content: e
- delay: 192
content: v
- delay: 151
content: e
- delay: 146
content: 'n'
- delay: 69
content: t
- delay: 91
content: s
- delay: 425
content: "\r\n\e[?2004l\r"
- delay: 439
content: "\e[?25h\e[34mℹ\e[39m hello\r\n\e[?25h\e[31m✖\e[39m world\r\n\e[?25h\e[?25h\e[33m⚠\e[39m hello world\r\n\e[?25h\e[32m✔\e[39m complete\r\n"
- delay: 1500
content: "\e[H\e[2J\e[01;32m$\e[00m "
Loading

0 comments on commit abf1528

Please sign in to comment.