Created
June 27, 2018 22:05
-
-
Save mturley/3e12e92f3209a419485b7636e86ff772 to your computer and use it in GitHub Desktop.
n, i, nfo, nit, np, nip and nab. Fish shell aliases and functions for using npm and grabbing package names super quickly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/git > nfo ngnx-local Wed Jun 27 18:01:36 2018 | |
npm ERR! code E404 | |
npm ERR! 404 Not found : ngnx-local | |
npm ERR! 404 | |
npm ERR! 404 'ngnx-local' is not in the npm registry. | |
npm ERR! 404 You should bug the author to publish it (or use the name yourself!) | |
npm ERR! 404 | |
npm ERR! 404 Note that you can also install from a | |
npm ERR! 404 tarball, folder, http url, or git url. | |
npm ERR! A complete log of this run can be found in: | |
npm ERR! /Users/mturley/.npm/_logs/2018-06-27T22_01_41_758Z-debug.log | |
! > ~/git > nab ngnx-local 934ms Wed Jun 27 18:01:41 2018 | |
This utility will walk you through creating a package.json file. | |
It only covers the most common items, and tries to guess sensible defaults. | |
See `npm help json` for definitive documentation on these fields | |
and exactly what they do. | |
Use `npm install <pkg>` afterwards to install a package and | |
save it as a dependency in the package.json file. | |
Press ^C at any time to quit. | |
package name: (ngnx-local) | |
version: (1.0.0) | |
description: | |
entry point: (index.js) | |
test command: | |
git repository: | |
keywords: | |
author: | |
license: (ISC) | |
About to write to /Users/mturley/git/ngnx-local/package.json: | |
{ | |
"name": "ngnx-local", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC" | |
} | |
Is this OK? (yes) | |
npm notice | |
npm notice 📦 [email protected] | |
npm notice === Tarball Contents === | |
npm notice 206B package.json | |
npm notice === Tarball Details === | |
npm notice name: ngnx-local | |
npm notice version: 1.0.0 | |
npm notice package size: 241 B | |
npm notice unpacked size: 206 B | |
npm notice shasum: da57ed6f1e1c20c807eb12befbf936c351eedfd8 | |
npm notice integrity: sha512-0EWRhJUMD7ZDD[...]3rrdYpASo7MXw== | |
npm notice total files: 1 | |
npm notice | |
+ [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias n='npm' | |
alias i='npm i' | |
alias nfo='npm info' | |
alias nit='npm init' | |
alias np='npm publish' | |
alias nip='nit; np' | |
function nab -d 'npm grab package' -a pkgname | |
set -q pkgname[1] | |
mkdir ~/git/$pkgname | |
cd ~/git/$pkgname | |
nip | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment