UNPKG

4.06 kBMarkdownView Raw
1apeman-d
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/apeman-cmd-labo/apeman-d
17[bd_travis_url]: http://travis-ci.org/apeman-cmd-labo/apeman-d
18[bd_travis_shield_url]: http://img.shields.io/travis/apeman-cmd-labo/apeman-d.svg?style=flat
19[bd_license_url]: https://github.com/apeman-cmd-labo/apeman-d/blob/master/LICENSE
20[bd_codeclimate_url]: http://codeclimate.com/github/apeman-cmd-labo/apeman-d
21[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-cmd-labo/apeman-d.svg?style=flat
22[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-cmd-labo/apeman-d.svg?style=flat
23[bd_gemnasium_url]: https://gemnasium.com/apeman-cmd-labo/apeman-d
24[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-cmd-labo/apeman-d.svg
25[bd_npm_url]: http://www.npmjs.org/package/apeman-d
26[bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-d.svg?style=flat
27[bd_bower_badge_url]: https://img.shields.io/bower/v/apeman-d.svg?style=flat
28
29<!-- Badge End -->
30
31
32<!-- Description Start -->
33<a name="description"></a>
34
35Daemon manager for apeman.
36
37<!-- Description End -->
38
39
40<!-- Overview Start -->
41<a name="overview"></a>
42
43
44
45<!-- Overview End -->
46
47
48<!-- Sections Start -->
49<a name="sections"></a>
50
51<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
52
53<a name="section-doc-guides-01-installation-md"></a>
54Installation
55-----
56
57Install apeman-d module via [npm][npm_url].
58```bash
59$ npm install apeman-d -g
60```
61
62
63[npm_url]: https://www.npmjs.com/
64
65
66<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
67
68<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
69
70<a name="section-doc-guides-02-usage-md"></a>
71Usage
72---------
73
741. Prepare an Apemanfile.js at your project root.
752. Run the command via CLI.
76
77***Apemanfile.js***
78```javascript
79/** Example of Apemanfile.js */
80
81"use strict";
82
83module.exports = {
84 $pkg: require('./package.json')
85};
86```
87
88Then,
89
90```bash
91$ apeman-d
92```
93
94
95##### CLI Options
96
97```bash
98$ apeman-d -h
99
100 Usage: apeman-d [options] <action> <script>
101
102 Daemon manager for apeman.
103
104 Options:
105
106 -h, --help output usage information
107 -V, --version output the version number
108 -v, --verbose Show verbose logs
109 -f, --force Force to action
110 -c, --configuration <configuration> Pathname of Apemanfile
111
112 Examples:
113
114 $ apeman-d start ./app/ui-app.js # Start an app.
115
116
117```
118
119
120<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
121
122<!-- Section from "doc/guides/03.Programmatic API.md.hbs" Start -->
123
124<a name="section-doc-guides-03-programmatic-a-p-i-md"></a>
125Programmatic API
126---
127
128apeman-d also provide programmatic API.
129
130Firstly, install the module locally.
131
132```bash
133$ npm install apeman-d --save-dev
134```
135
136Then,
137
138```javascript
139"use strict";
140
141const apemanD = require('apeman-d'),
142 Apemanfile = require.resolve('./Apemanfile.js');
143
144apemanD.start({
145 configuration: Apemanfile
146}, (err) => {
147 /*...*/
148});
149```
150
151
152##### Programmatic Options
153
154| Key | Description | Default |
155| --- | ----------- | ------- |
156| verbose | Show verbose logs | |
157| force | Force to action | |
158| configuration | Pathname of Apemanfile | |
159
160
161<!-- Section from "doc/guides/03.Programmatic API.md.hbs" End -->
162
163
164<!-- Sections Start -->
165
166
167<!-- LICENSE Start -->
168<a name="license"></a>
169
170License
171-------
172This software is released under the [MIT License](https://github.com/apeman-cmd-labo/apeman-d/blob/master/LICENSE).
173
174<!-- LICENSE End -->
175
176
177<!-- Links Start -->
178<a name="links"></a>
179
180Links
181------
182
183+ [apeman](http://github.com/apeman-labo/apeman)
184+ [apeman-cmd-labo](http://github.com/apeman-cmd-labo)
185
186<!-- Links End -->