Socket
Socket
Sign inDemoInstall

dpd-codemodule

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dpd-codemodule

Deployd module to create reusable code modules that can be required by event scripts.


Version published
Weekly downloads
6
increased by500%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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').

FAQs

Last updated on 03 Nov 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc