Skip to content

Latest commit

 

History

History
163 lines (137 loc) · 11.3 KB

File metadata and controls

163 lines (137 loc) · 11.3 KB

shieldsIO shieldsIO shieldsIO

WideImg

Máster en Programación FullStack con JavaScript y Node.js

JS, Node.js, Frontend, Backend, Firebase, Express, Patrones, HTML5_APIs, Asincronía, Websockets, Testing

Clase 87

Command-line apps

  • np - Better npm publish.
  • npm-name - Check whether a package name is available on npm.
  • gh-home - Open the GitHub page of the repo in the current directory.
  • npm-home - Open the npm page of a package.
  • trash - Safer alternative to rm.
  • speed-test - Test your internet connection speed and ping.
  • emoj - Find relevant emoji from text on the command-line.
  • pageres - Capture website screenshots.
  • cpy - Copy files.
  • vtop - More better top, with nice charts.
  • empty-trash - Empty the trash.
  • is-up - Check whether a website is up or down.
  • is-online - Check if the internet connection is up.
  • public-ip - Get your public IP address.
  • clipboard-cli - Copy & paste on the terminal.
  • XO - Enforce strict code style using the JavaScript happiness style.
  • Standard - JavaScript Standard Style — One style to rule them all.
  • ESLint - The pluggable linting utility for JavaScript.
  • dev-time - Get the current local time of a GitHub user.
  • David - Tells you when your package npm dependencies are out of date.
  • http-server - Simple, zero-config command-line HTTP server.
  • Live Server - Development HTTP-server with livereload capability.
  • bcat - Pipe command output to web browsers.
  • normit - Google Translate with speech synthesis in your terminal.
  • fkill - Fabulously kill processes. Cross-platform.
  • pjs - Pipeable JavaScript. Quickly filter, map, and reduce from the terminal.
  • license-checker - Check licenses of your app's dependencies.
  • browser-run - Easily run code in a browser environment.
  • tmpin - Adds stdin support to any CLI app that accepts file input.
  • wifi-password - Get the current wifi password.
  • wallpaper - Change the desktop wallpaper.
  • brightness - Change the screen brightness.
  • torrent - Download torrents.
  • kill-tabs - Kill all Chrome tabs to improve performance, decrease battery usage, and save memory.
  • alex - Catch insensitive, inconsiderate writing.
  • pen - Live Markdown preview in the browser from your favorite editor.
  • subdownloader - Subtitle downloader for movies and TV series.
  • dark-mode - Toggle the macOS Dark Mode.
  • iponmap - IP location finder.
  • Jsome - Pretty prints JSON with configurable colors and indentation.
  • itunes-remote - Interactively control iTunes.
  • mobicon - Mobile app icon generator.
  • mobisplash - Mobile app splash screen generator.
  • diff2html-cli - Pretty git diff to HTML generator.
  • Cash - Cross-platform Unix shell commands in pure JavaScript.
  • trymodule - Try out npm packages in the terminal.
  • jscpd - Copy/paste detector for source code.
  • atmo - Server-side API mocking.
  • auto-install - Auto installs dependencies as you code.
  • lessmd - Markdown in the terminal.
  • cost-of-modules - Find out which dependencies are slowing you down.
  • localtunnel - Expose your localhost to the world.
  • svg-term-cli - Share terminal sessions via SVG.
  • gtop - System monitoring dashboard for the terminal.
  • themer - Generate themes for your editor, terminal, wallpaper, Slack, and more.

Command-line utilities

  • chalk - Terminal string styling done right.
  • meow - CLI app helper.
  • yargs - Command-line parser that automatically generates an elegant user-interface.
  • ora - Elegant terminal spinner.
  • get-stdin - Easier stdin.
  • log-update - Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.
  • Ink - React for interactive command-line apps.
  • listr - Terminal task list.
  • conf - Simple config handling for your app or module.
  • ansi-escapes - ANSI escape codes for manipulating the terminal.
  • log-symbols - Colored symbols for various log levels.
  • figures - Unicode symbols with Windows CMD fallbacks.
  • boxen - Create boxes in the terminal.
  • terminal-link - Create clickable links in the terminal.
  • terminal-image - Display images in the terminal.
  • string-width - Get the visual width of a string - the number of columns required to display it.
  • cli-truncate - Truncate a string to a specific width in the terminal.
  • first-run - Check if it's the first time the process is run.
  • vorpal - Interactive CLI apps.
  • blessed - Curses-like library.
  • Inquirer.js - Interactive command-line prompt.
  • yn - Parse yes/no like values.
  • cli-table3 - Pretty unicode tables.
  • drawille - Draw on the terminal with unicode braille characters.
  • update-notifier - Update notifications for your CLI app.
  • ascii-charts - ASCII bar chart in the terminal.
  • progress - Flexible ascii progress bar.
  • insight - Helps you understand how your tool is being used by anonymously reporting usage metrics to Google Analytics.
  • cli-cursor - Toggle the CLI cursor.
  • columnify - Create text-based columns suitable for console output. Supports cell wrapping.
  • cli-columns - Columnated unicode and ansi-safe text lists.
  • cfonts - Sexy ASCII fonts for the console.
  • multispinner - Multiple, simultaneous, individually controllable CLI spinners.
  • omelette - Shell autocompletion helper.
  • cross-env - Set environment variables cross-platform.
  • shelljs - Portable Unix shell commands.
  • sudo-block - Block users from running your app with root permissions.
  • loud-rejection - Make unhandled promise rejections fail loudly instead of the default silent fail.
  • sparkly - Generate sparklines ▁▂▃▅▂▇
  • Bit - Create, maintain, find and use small modules and components across repositories.
  • gradient-string - Beautiful color gradients in terminal output.
  • oclif - CLI framework complete with parser, automatic documentation, testing, and plugins.
  • term-size - Reliably get the terminal window size.

readline

Preguntas

const readline = require('readline');

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

rl.question('What do you think of Node.js? ', (answer) => {
  console.log(`Thank you for your valuable feedback: ${answer}`);
  rl.close();
});

Recursos

Vorpal

img

Documentación

Ejercicios

1 - Vamos a crear una CLI con Vorpal para saber que terremotos pasaron en el mundo. Para ello preguntaremos al usuario el periodo (hora, dia, semana, mes) y la intensidad (significativos, todos, +1.1...). Usaremos como fuente de datos USGV

    // Tu solución