build-shell-script

1.0.2 • Public • Published

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

Name Description Type Default
prefix Left side of shell alias string None (required)
suffix Right side of shell alias string None (required)

Returns

Type: string

buildShellScript.fn(prefix, suffix)

Arguments

Name Description Type Default
prefix Left side of shell function string None (required)
suffix Right side of shell function string or array None (required)

Returns

Type: string

License

MIT © Dawson Botsford

Readme

Keywords

Package Sidebar

Install

npm i build-shell-script

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • dawsonbotsford