1.0.4 • Published 4 months ago

qtools-library-dot-d v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

qtools-library-dot-d

NOT READY. STILL WORKING IT OUT.

NAME

    qtools-library-dot-d

DESCRIPTION

Utility provides tools to scan a directory for NodeJS modules, require() them into existance with tools to connect them to a system.

First use case is adding endpoints to an expressJS system. When instantiated, qtDotD

scans a directory containing modules, dotLib.d. It requires it with two parameters,

dotD and passThroughArgs. For this case, passThrough args has two properties,

expressApp and routingPrefix. The module uses these to construct one or more

expressJS endpoitns.

the dotD object contains three parameters, add....

ASYNCHRONOUS CODE SAMPLE

const promptObjects = require('qtools-library-dot-d')({ libraryName: 'promptObjects', }, callback); promptObjects.setLibraryPath(path.join(__dirname, 'prompts.d'), callback);

const passThroughParameters = {}; promptObjects.loadModules({ passThroughParameters }, callback); promptObjects.seal(); //make the library immutable

NEW SYNCHROMOUS CODE SAMPLE:

const promptObjects = require('qtools-library-dot-d')({ libraryName: 'promptObjects', }); promptObjects.setLibraryPath(path.join(__dirname, 'prompts.d'));

const passThroughParameters = {}; promptObjects.loadModules({ passThroughParameters }); promptObjects.seal(); //make the library immutable

HISTORY

v1.04 - Now tolerates (and reports) directories and files that are not modules.

1.0.4

4 months ago

1.0.3

11 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago