Skip to content

This custom resource type allows you to write code that can be required by other resources.

License

Notifications You must be signed in to change notification settings

andreialecu/dpd-codemodule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Code Resource for deployd

Current Version

This is a custom deployd resource type allows you to write code that can be required by other resources.

Installation

In your app's root directory, type npm install dpd-codemodule --save into the command line or download the source. This should create a dpd-codemodule directory in your app's node_modules directory.

See Installing Modules for details.

Usage

You can write your reusable code inside the Index event. Follow nodejs module conventions by using exports.somename = ...;. See nodejs modules documentation for more details.

Later on in your event code, you can use:

var myCodeModule = requireModule('coderesourcename'); and you will have access to the code shared by the module.

This resource explicitly adds the requireModule(name) global function which acts as a helper function for finding the proper path of the module.

Alternatively, you can use something like require('../../resources/coderesourcename').

About

This custom resource type allows you to write code that can be required by other resources.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published