1 | apeman-ui
|
2 | ==========
|
3 |
|
4 |
|
5 | This file is generated by ape-tmpl. Do not update manually.
|
6 | --->
|
7 |
|
8 |
|
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 | [![JS Standard][bd_standard_shield_url]][bd_standard_url]
|
16 |
|
17 | [bd_repo_url]: https://github.com/apeman-cmd-labo/apeman-ui
|
18 | [bd_travis_url]: http://travis-ci.org/apeman-cmd-labo/apeman-ui
|
19 | [bd_travis_shield_url]: http://img.shields.io/travis/apeman-cmd-labo/apeman-ui.svg?style=flat
|
20 | [bd_travis_com_url]: http://travis-ci.com/apeman-cmd-labo/apeman-ui
|
21 | [bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-cmd-labo/apeman-ui.svg?token=
|
22 | [bd_license_url]: https://github.com/apeman-cmd-labo/apeman-ui/blob/master/LICENSE
|
23 | [bd_codeclimate_url]: http://codeclimate.com/github/apeman-cmd-labo/apeman-ui
|
24 | [bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-cmd-labo/apeman-ui.svg?style=flat
|
25 | [bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-cmd-labo/apeman-ui.svg?style=flat
|
26 | [bd_gemnasium_url]: https://gemnasium.com/apeman-cmd-labo/apeman-ui
|
27 | [bd_gemnasium_shield_url]: https://gemnasium.com/apeman-cmd-labo/apeman-ui.svg
|
28 | [bd_npm_url]: http://www.npmjs.org/package/apeman-ui
|
29 | [bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-ui.svg?style=flat
|
30 | [bd_standard_url]: http://standardjs.com/
|
31 | [bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | <a name="description"></a>
|
38 |
|
39 | UI server for apeman
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | <a name="overview"></a>
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | <a name="sections"></a>
|
54 |
|
55 |
|
56 |
|
57 | <a name="section-doc-guides-01-installation-md"></a>
|
58 |
|
59 | Installation
|
60 | -----
|
61 |
|
62 | Install apeman-ui module via [npm][npm_url].
|
63 | ```bash
|
64 | $ npm install apeman-ui -g
|
65 | ```
|
66 |
|
67 |
|
68 | [npm_url]: https://www.npmjs.com/
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 | <a name="section-doc-guides-02-usage-md"></a>
|
76 |
|
77 | Usage
|
78 | ---------
|
79 |
|
80 | 1. Prepare an Apemanfile.js at your project root.
|
81 | 2. Run the command via CLI.
|
82 |
|
83 | ***Apemanfile.js***
|
84 | ```javascript
|
85 | /** Example of Apemanfile.js */
|
86 |
|
87 | 'use strict'
|
88 |
|
89 | module.exports = {
|
90 | $cwd: __dirname,
|
91 | $pkg: { /* ... */ },
|
92 | $proto: [ /* ... */ ],
|
93 | $ui: {
|
94 | 'user': {
|
95 | profile () {
|
96 | return Promise.resolve(`
|
97 | <html><!-- ... ---></html>
|
98 | `)
|
99 | }
|
100 | }
|
101 | }
|
102 | }
|
103 |
|
104 | ```
|
105 |
|
106 | Then,
|
107 |
|
108 | ```bash
|
109 | $ apeman-ui
|
110 | ```
|
111 |
|
112 |
|
113 | ##### CLI Options
|
114 |
|
115 | ```bash
|
116 | $ apeman-ui -h
|
117 |
|
118 | Usage: apeman-ui [options]
|
119 |
|
120 | UI server for apeman
|
121 |
|
122 | Options:
|
123 |
|
124 | -h, --help output usage information
|
125 | -V, --version output the version number
|
126 | -v, --verbose Show verbose logs
|
127 | -c, --configuration <configuration> Pathname of Apemanfile
|
128 |
|
129 | Examples:
|
130 |
|
131 | $ apeman-ui # __description_of_command_usage__
|
132 |
|
133 |
|
134 | ```
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | <a name="section-doc-guides-03-programmatic-a-p-i-md"></a>
|
142 |
|
143 | Programmatic API
|
144 | ---
|
145 |
|
146 | apeman-ui also provide programmatic API.
|
147 |
|
148 | Firstly, install the module locally.
|
149 |
|
150 | ```bash
|
151 | $ npm install apeman-ui --save-dev
|
152 | ```
|
153 |
|
154 | Then,
|
155 |
|
156 | ```javascript
|
157 | #!/usr/bin/env
|
158 |
|
159 | 'use strict'
|
160 |
|
161 | const apemanUi = require('apeman-ui')
|
162 | const co = require('co')
|
163 |
|
164 | co(function * () {
|
165 | yield apemanUi({})
|
166 | }).catch((err) => console.error(err))
|
167 |
|
168 | ```
|
169 |
|
170 |
|
171 | ##### Programmatic Options
|
172 |
|
173 | | Key | Description | Default |
|
174 | | --- | ----------- | ------- |
|
175 | | verbose | Show verbose logs | |
|
176 | | configuration | Pathname of Apemanfile | |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 | <a name="license"></a>
|
187 |
|
188 | License
|
189 | -------
|
190 | This software is released under the [MIT License](https://github.com/apeman-cmd-labo/apeman-ui/blob/master/LICENSE).
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 | <a name="links"></a>
|
197 |
|
198 | Links
|
199 | ------
|
200 |
|
201 | + [apeman][apeman_url]
|
202 | + [apeman-cmd-labo][apeman_cmd_labo_url]
|
203 |
|
204 | [apeman_url]: http://github.com/apeman-labo/apeman
|
205 | [apeman_cmd_labo_url]: http://github.com/apeman-cmd-labo
|
206 |
|
207 |
|