UNPKG

2.85 kBMarkdownView Raw
1execcli
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
9<a name="badges"></a>
10
11[![Build Status][bd_travis_shield_url]][bd_travis_url]
12[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
13[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
14[![npm Version][bd_npm_shield_url]][bd_npm_url]
15
16[bd_repo_url]: https://github.com/okunishinishi/node-execcli
17[bd_travis_url]: http://travis-ci.org/okunishinishi/node-execcli
18[bd_travis_shield_url]: http://img.shields.io/travis/okunishinishi/node-execcli.svg?style=flat
19[bd_license_url]: https://github.com/okunishinishi/node-execcli/blob/master/LICENSE
20[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-execcli
21[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-execcli.svg?style=flat
22[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-execcli.svg?style=flat
23[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-execcli
24[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-execcli.svg
25[bd_npm_url]: http://www.npmjs.org/package/execcli
26[bd_npm_shield_url]: http://img.shields.io/npm/v/execcli.svg?style=flat
27[bd_standard_url]: http://standardjs.com/
28[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
29
30<!-- Badge End -->
31
32
33<!-- Description Start -->
34<a name="description"></a>
35
36Execute CLI command on sub process.
37
38<!-- Description End -->
39
40
41
42
43<!-- Sections Start -->
44<a name="sections"></a>
45
46<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
47
48<a name="section-doc-guides-01-installation-md"></a>
49Installation
50-----
51
52```bash
53npm install execcli --save
54```
55
56
57<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
58
59<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
60
61<a name="section-doc-guides-02-usage-md"></a>
62Usage
63----
64
65```javascript
66#!/usr/bin/env node
67
68/**
69 * This is an example to use execcli.
70 */
71
72'use strict'
73
74const execcli = require('execcli')
75
76// Equivalent to execute `ls -l .` from command line.
77execcli('ls', [ '.', { 'l': true } ]).then(() => {
78 /* ... */
79})
80
81````
82
83<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
84
85<!-- Section from "doc/guides/03.Options.md.hbs" Start -->
86
87<a name="section-doc-guides-03-options-md"></a>
88Options
89-------
90
91| Key | Description | Default |
92| --- | --- | --- |
93| notfound | Instruction text when bin not found. | '' |
94| cwd | Working directory path | process.cwd() |
95
96
97<!-- Section from "doc/guides/03.Options.md.hbs" End -->
98
99
100<!-- Sections Start -->
101
102
103<!-- LICENSE Start -->
104<a name="license"></a>
105
106License
107-------
108This software is released under the [MIT License](https://github.com/okunishinishi/node-execcli/blob/master/LICENSE).
109
110<!-- LICENSE End -->
111
112
113
\No newline at end of file