apeman-ui
UI server for apeman
Last updated 2 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apeman-ui 
SYNC missed versions from official npm registry.

apeman-ui

Build Status Code Climate Code Coverage npm Version JS Standard

UI server for apeman

Installation

Install apeman-ui module via npm.

$ npm install apeman-ui -g

Usage

  1. Prepare an Apemanfile.js at your project root.
  2. Run the command via CLI.

Apemanfile.js

/** Example of Apemanfile.js */

'use strict'

module.exports = {
  $cwd: __dirname,
  $pkg: { /* ... */ },
  $proto: [ /* ... */ ],
  $ui: {
    'user': {
      profile () {
        return Promise.resolve(`
<html><!-- ... ---></html>
`)
      }
    }
  }
}

Then,

$ apeman-ui
CLI Options
$ apeman-ui -h

  Usage: apeman-ui [options] 

  UI server for apeman

  Options:

    -h, --help                           output usage information
    -V, --version                        output the version number
    -v, --verbose                        Show verbose logs
    -c, --configuration <configuration>  Pathname of Apemanfile

  Examples:

  $ apeman-ui                   # __description_of_command_usage__


Programmatic API

apeman-ui also provide programmatic API.

Firstly, install the module locally.

$ npm install apeman-ui --save-dev

Then,

#!/usr/bin/env

'use strict'

const apemanUi = require('apeman-ui')
const co = require('co')

co(function * () {
  yield apemanUi({})
}).catch((err) => console.error(err))

Programmatic Options
Key Description Default
port Port number to invoke
configuration Pathname of Apemanfile

License

This software is released under the MIT License.

Links

Current Tags

  • 3.0.9                                ...           latest (2 years ago)

19 Versions

  • 3.0.9                                ...           2 years ago
  • 3.0.8                                ...           2 years ago
  • 3.0.7                                ...           2 years ago
  • 3.0.6                                ...           2 years ago
  • 3.0.5                                ...           2 years ago
  • 3.0.4                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.0.6 [deprecated]           ...           2 years ago
  • 2.0.4 [deprecated]           ...           3 years ago
  • 2.0.3 [deprecated]           ...           3 years ago
  • 2.0.2 [deprecated]           ...           3 years ago
  • 2.0.1 [deprecated]           ...           3 years ago
  • 2.0.0 [deprecated]           ...           3 years ago
  • 1.1.1 [deprecated]           ...           3 years ago
  • 1.1.0 [deprecated]           ...           3 years ago
  • 1.0.1 [deprecated]           ...           3 years ago
  • 1.0.0 [deprecated]           ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 19
Last Day 0
Last Week 0
Last Month 20
Dependencies (8)
Dev Dependencies (12)
Dependents (2)

Copyright 2014 - 2018 © taobao.org |