UNPKG

4.14 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 ./bin/app/ui-app.js # Start an app.
115 $ apeman-d stop ./bin/app/ui-app.js # Start an app.
116
117
118```
119
120
121<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
122
123<!-- Section from "doc/guides/03.Programmatic API.md.hbs" Start -->
124
125<a name="section-doc-guides-03-programmatic-a-p-i-md"></a>
126Programmatic API
127---
128
129apeman-d also provide programmatic API.
130
131Firstly, install the module locally.
132
133```bash
134$ npm install apeman-d --save-dev
135```
136
137Then,
138
139```javascript
140"use strict";
141
142const apemanD = require('apeman-d'),
143 Apemanfile = require.resolve('./Apemanfile.js');
144
145apemanD.start({
146 configuration: Apemanfile
147}, (err) => {
148 /*...*/
149});
150```
151
152
153##### Programmatic Options
154
155| Key | Description | Default |
156| --- | ----------- | ------- |
157| verbose | Show verbose logs | |
158| force | Force to action | |
159| configuration | Pathname of Apemanfile | |
160
161
162<!-- Section from "doc/guides/03.Programmatic API.md.hbs" End -->
163
164
165<!-- Sections Start -->
166
167
168<!-- LICENSE Start -->
169<a name="license"></a>
170
171License
172-------
173This software is released under the [MIT License](https://github.com/apeman-cmd-labo/apeman-d/blob/master/LICENSE).
174
175<!-- LICENSE End -->
176
177
178<!-- Links Start -->
179<a name="links"></a>
180
181Links
182------
183
184+ [apeman](http://github.com/apeman-labo/apeman)
185+ [apeman-cmd-labo](http://github.com/apeman-cmd-labo)
186
187<!-- Links End -->