apemanmodule
Directory module index for apeman.
Last updated 4 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apemanmodule 
SYNC missed versions from official npm registry.

apemanmodule

Build Status Code Climate Code Coverage npm Version JS Standard

Directory module index for apeman.

Installation

$ npm install apemanmodule --save

Usage

apemanmodule dig in directory and exports found modules.

/**
 * This is an example index.js for a module directory.
 */
'use strict'

const apemanmodule = require('apemanmodule')

let index = apemanmodule(__dirname, {
  /** Filename pattern to exports as pascal case name. **/
  pascal: '*_page.js',
  /** Throws error when module not found. */
  strict: true
})

// Print module settings.
index.print()

module.exports(index)

Then, you can require exported modules like:

'use strict'

const exampleIndex = require('../example')

// Get modules defined example/index.js
let FooPage = exampleIndex('FooPage')
let barFunc = exampleIndex('barFunc')

/* ... */

License

This software is released under the MIT License.

Links

Current Tags

  • 2.0.1                                ...           latest (4 years ago)

18 Versions

  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.6.0                                ...           4 years ago
  • 1.5.3                                ...           4 years ago
  • 1.5.2                                ...           4 years ago
  • 1.5.1                                ...           4 years ago
  • 1.5.0                                ...           4 years ago
  • 1.4.2                                ...           4 years ago
  • 1.4.1                                ...           4 years ago
  • 1.4.0                                ...           4 years ago
  • 1.3.1                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |