BADGES GO HERE
This repository is currently in development.
This module provides adapter for the DATASOURE datasource for integration with Modli.
npm install modli-ADAPTER_NAME --save
import { model, adapter, Joi, use } from 'modli';
import { ADAPTER_NAME } from 'modli-ADAPTER_NAME';
// Create a model
model.add({
name: 'testModel',
version: 1,
schema: {
/* ...schema properties... */
}
});
// Add adapter using NeDB
model.add({
name: 'testADAPTER_NAME',
source: ADAPTER_NAME
config: {
/*...*/
}
});
const testModli = use('testModel', 'testADAPTER_NAME');A Makefile is included for managing build and install tasks. The commands are
then referenced in the package.json scripts if that is the preferred
task method:
all(default) will run all build tasksstartwill run the main scriptcleanwill remove the/node_modulesdirectoriesbuildwill transpile ES2015 code in/srcto/buildtestwill run all spec files in/test/srctest-coverwill run code coverage on all testslintwill lint all files in/src
Running make test will run the full test suite. Since adapters require a data
source if one is not configured the tests will fail. To counter this tests are
able to be broken up.
Test Inidividual File
An individual spec can be run by specifying the FILE. This is convenient when
working on an individual adapter.
make test FILE=some.spec.js
The FILE is relative to the test/src/ directory.
Deploys
For deploying releases, the deploy TAG={VERSION} can be used where VERSION can be:
<newversion> | major | minor | patch | premajor
Both make {COMMAND} and npm run {COMMAND} work for any of the above commands.
Modli-ADAPTER_NAME is licensed under the MIT license. Please see LICENSE.txt for full details.
Modli-ADAPTER_NAME was designed and created at TechnologyAdvice.