0.1.6 • Published 8 years ago

dolphin-core-modules v0.1.6

Weekly downloads
28
License
-
Repository
github
Last release
8 years ago

Main core module to build any modules

Installation

npm install dolphin-core-modules --save

How to create new Module

var Module = require('dolphin-core-modules').Module;

//the first parameter is name of module, unique for all modules
//the second is current path
var test = new Module('Test', __dirname); 

You can create factories via two ways:

  • Folder
  • API

1) Folder

root_of_package
   factories

You must return object with two keys:

1) name

2) entity

Example

module.exports = {
    name: 'Config',
    entity: {
       
    }
};

2) API

test.addFactory('Any_name', function () {
    return {
        some keys or methods
    };
});

After initialization your factory will get name TestConfigFactory

Configuration other factories

test.configureFactories(function (/*Name_OF_Factory*/, /*Name_OF_Factory*/...) {
    //here you can change any settings of factories 
});

Run main logic

test.run(function (/*Name_OF_Factory*/, /*Name_OF_Factory*/...) {
    //here you will get last versions of factories   
});
0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago