module-export
A module exporter for Node v4+
Contents
Usage
In Progress... Basic usage:
const moduleExport = require('module-export')(module);
moduleExport(() => { ... }); // Export a function
moduleExport({ ... }); // Export an object
class MyClass { ... }
moduleExport(MyClass); // Export a class
Testing
module-export
uses xo
(with slightly customized configuration) for linting, ava
for unit testing, and nyc
for coverage.
Test Scripts
npm run lint
: Usesxo
to lint the main source file,index.js
.npm run test-lint
: Usesxo
to lint the test source files, located intest/
.npm run unit
: Executestest-lint
and runs theava
unit tests usingnyc
for coverage.npm report
: Generates an HTML coverage report fromnyc
.npm run test
: Executeslint
,unit
andreport
in that order.
API
In Progress...