1.0.2 • Published 9 years ago
module-export v1.0.2
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 classTesting
module-export uses xo (with slightly customized configuration) for linting, ava for unit testing, and nyc for coverage.
Test Scripts
npm run lint: Usesxoto lint the main source file,index.js.npm run test-lint: Usesxoto lint the test source files, located intest/.npm run unit: Executestest-lintand runs theavaunit tests usingnycfor coverage.npm report: Generates an HTML coverage report fromnyc.npm run test: Executeslint,unitandreportin that order.
API
In Progress...