Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Overload-able functions #7

Closed
gerhard opened this issue Apr 5, 2012 · 2 comments
Closed

Overload-able functions #7

gerhard opened this issue Apr 5, 2012 · 2 comments
Assignees
Labels
Milestone

Comments

@gerhard
Copy link
Owner

gerhard commented Apr 5, 2012

If I need to tweak the setup function from the nodejs strategy, I shouldn't need to create a custom strategy. Overloading specific strategy functions in the config file would make the entire experience a lot neater.

@gerhard
Copy link
Owner Author

gerhard commented Jul 5, 2012

This only needs documenting, the new modular approach makes it a cinch.

@ghost ghost assigned gerhard Jul 5, 2012
@gerhard
Copy link
Owner Author

gerhard commented Jul 26, 2012

Take the following .deliver/config taken from a production node.js app (uses deliver v0.6.0-pre):

#!/usr/bin/env bash

SERVER="nodejs-1"
APP="analytics_api"
PORT="5010"
STRATEGY="nodejs"
AUTHORIZED_REMOTE_HOSTS+=("bitbucket.org")

npm_install() {
  status "Setting up nvm & npm modules"
  __remote "
    cd $DELIVER_TO
    bin/setup
  "
}

I've replaced the default npm_install() function by adding nvm logic and a few extra steps, all encapsulated in that app's bin/setup. It's that simple!

@gerhard gerhard closed this as completed Jul 26, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant