ship-hold-extension-loader
v1.0.0
Published
loads ship-hold extension based on convention
Downloads
3
Maintainers
Readme
ship-hold-extension-loader
loads ship-hold extension based on convention
install
npm install ship-hold-extension-loader
usage
assuming you have
.
|
|---sh-extensions
| |----ext.js
| |----otherExt.js
ext.js and otherExt.js following the following pattern
module.exports = function (h){
return {
table:'users',
columns:{},
relations:{}
};
};
then use ship-hold-extension-loader
const sh = require('ship-hold')(/* options */);
const extLoader = require('ship-hold-extension-loader'); // can pass options here
extLoader(sh,options);
options to pass to the factory
- folder: the folder to read through to find the extension files (default './sh-extensions')
- exclude: an array of file to exclude (default empty array)