New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

build-shell-script

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-shell-script

Build shell aliases and functions

1.0.2
latest
Source
npm
Version published
Weekly downloads
11
Maintainers
1
Weekly downloads
 
Created
Source

build-shell-script

NPM version Build Status XO code style

Build shell aliases and functions from Node

Install

npm install --save build-shell-script

Usage

const buildShellScript = require('build-shell-script');

buildShellScript.alias('gi', 'git init');
//=> 'alias gi="git init"

buildShellScript.fn('gi', 'git init');
//=> function gi() {
//     git init
//   }

buildShellScript.fn('g', [
  'git add -A',
  'git commit',
  'git push'
]);
//=> function g() {
//     git add -A
//     git commit
//     git push
//   }

API

buildShellScript.alias(prefix, suffix)

Arguments
NameDescriptionTypeDefault
prefixLeft side of shell aliasstringNone (required)
suffixRight side of shell aliasstringNone (required)
Returns

Type: string

buildShellScript.fn(prefix, suffix)

Arguments
NameDescriptionTypeDefault
prefixLeft side of shell functionstringNone (required)
suffixRight side of shell functionstring or arrayNone (required)
Returns

Type: string

License

MIT © Dawson Botsford

Keywords

dawson

FAQs

Package last updated on 01 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts