Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npxcard #3

Merged
merged 2 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
language: node_js
node_js:
- "6"
- "10"
- "8"

23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Shawn NPX Card

You need Node 6.x or higher, or the one that first had `npx` bundled with it...

```
npx shawn
npx: installed 38 in 8.94s

╭───────────────────────────────────────────────────────╮
│ │
│ Shawn P Cicoria / cicorias │
│ │
│ Work: Principal Engineer at Microsoft │
│ Twitter: https://twitter.com/cicorias │
│ GitHub: https://github.com/cicorias │
│ LinkedIn: https://linkedin.com/in/shawncicoria │
│ Web: https://cicoria.com │
│ │
│ Card: npx shawn │
│ │
╰───────────────────────────────────────────────────────╯

```
7 changes: 0 additions & 7 deletions app.js

This file was deleted.

46 changes: 46 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env node
// 👆 Used to tell Node.js that this is a CLI tool

// Pull in our modules
const chalk = require('chalk')
const boxen = require('boxen')

// Define options for Boxen
const options = {
padding: 1,
margin: 1,
borderStyle: 'round'
}

// Text + chalk definitions
const data = {
name: chalk.white('Shawn P Cicoria /'),
handle: chalk.cyan('cicorias'),
work: chalk.white('Principal Engineer at Microsoft'),
twitter: chalk.cyan('https://twitter.com/cicorias'),
github: chalk.cyan('https://github.com/cicorias'),
linkedin: chalk.cyan('https://linkedin.com/in/shawncicoria'),
web: chalk.cyan('https://cicoria.com'),
npx: chalk.white('npx shawn'),
labelWork: chalk.white.bold(' Work:'),
labelTwitter: chalk.white.bold(' Twitter:'),
labelGitHub: chalk.white.bold(' GitHub:'),
labelLinkedIn: chalk.white.bold(' LinkedIn:'),
labelWeb: chalk.white.bold(' Web:'),
labelCard: chalk.white.bold(' Card:')
}

// Actual strings we're going to output
const newline = '\n'
const heading = `${data.name} ${data.handle}`
const working = `${data.labelWork} ${data.work}`
const twittering = `${data.labelTwitter} ${data.twitter}`
const githubing = `${data.labelGitHub} ${data.github}`
const linkedining = `${data.labelLinkedIn} ${data.linkedin}`
const webing = `${data.labelWeb} ${data.web}`
const carding = `${data.labelCard} ${data.npx}`

// Put all our output together into a single variable so we can use boxen effectively
const output = heading + newline + newline + working + newline + twittering + newline + githubing + newline + linkedining + newline + webing + newline + newline + carding

console.log(chalk.green(boxen(output, options)))
1 change: 0 additions & 1 deletion index.js

This file was deleted.

Loading