3.2.1 • Published 2 years ago

khriztianmoreno v3.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

My npm card inspired by bitandbang

Run Via npx

$ npx khriztianmoreno

Stetps

  1. You can fork in the repo of bitandbang or just go creating your files.
# Create new folder
$ mkdir khriztianmoreno && cd $_

# Init the npm package
$ npm init
  1. Install the dependencies
# dependencies
$ npm i -S boxen chalk

# Dev dependencies
$ npm i -D standard
  1. Create the personal card
# Create bin folder
$ mkdir bin && cd $_

# Create the card.js file
$ touch card.js
  1. Add personal information to your card
#!/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('YOUR NAME / '),
  handle: chalk.cyan('HANDLENAME'),
  work: chalk.white('WHERE DO YOU WORK'),
  twitter: chalk.cyan('TWITTER ACCOUNT'),
  github: chalk.cyan('GITHUB ACCOUNT'),
  linkedin: chalk.cyan('LINKEDIN ACCOUNT'),
  web: chalk.cyan('YOUR WEBSITE'),
  npx: chalk.white('npx YOUR_ALIAS'),
  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. Create an account in npm.org, if you already have it, skip this step

  2. Know the version of your package dependency

$ npm version major
  1. Add your npm user - login
$ npm adduser 
  1. Publish your package
$ npm publish
  1. Run your npm-package card
$ npx khriztianmoreno
3.2.1

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

4.0.0

5 years ago

3.0.0

5 years ago