UNPKG

2.63 kBMarkdownView Raw
1askconfig
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[![bower version][bd_bower_badge_url]][bd_repo_url]
16
17[bd_repo_url]: https://github.com/okunishinishi/node-askconfig
18[bd_travis_url]: http://travis-ci.org/okunishinishi/node-askconfig
19[bd_travis_shield_url]: http://img.shields.io/travis/okunishinishi/node-askconfig.svg?style=flat
20[bd_license_url]: https://github.com/okunishinishi/node-askconfig/blob/master/LICENSE
21[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-askconfig
22[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-askconfig.svg?style=flat
23[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-askconfig.svg?style=flat
24[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-askconfig
25[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-askconfig.svg
26[bd_npm_url]: http://www.npmjs.org/package/askconfig
27[bd_npm_shield_url]: http://img.shields.io/npm/v/askconfig.svg?style=flat
28[bd_bower_badge_url]: https://img.shields.io/bower/v/askconfig.svg?style=flat
29
30<!-- Badge End -->
31
32
33<!-- Description Start -->
34<a name="description"></a>
35
36Node.js module to ask for configuration via interactive shell
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 askconfig --save
54```
55
56<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
57
58<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
59
60<a name="section-doc-guides-02-usage-md"></a>
61Usage
62-----
63
64```javascript
65#!/usr/bin/env node
66"use strict";
67
68const askconfig = require('askconfig');
69
70askconfig({
71 name: 'default-name',
72 description: ''
73}, (err, result) => {
74 if (err) {
75 console.error(err);
76 process.exit(1);
77 } else {
78 console.log("Result:", result);
79 process.exit(0);
80 }
81});
82
83
84````
85
86
87<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
88
89
90<!-- Sections Start -->
91
92
93<!-- LICENSE Start -->
94<a name="license"></a>
95
96License
97-------
98This software is released under the [MIT License](https://github.com/okunishinishi/node-askconfig/blob/master/LICENSE).
99
100<!-- LICENSE End -->
101
102
103
\No newline at end of file