grunt-deploy-to-env
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -15,6 +15,16 @@ 'use strict'; | ||
var performTheDeployment = function () { | ||
deploy.deploy(options, done); | ||
} | ||
if (options['beforeDeployment']) { | ||
options['beforeDeployment'](); | ||
// call the `beforeDeployment` callback and then perform the deployment | ||
options['beforeDeployment'](performTheDeployment); | ||
} | ||
else { | ||
performTheDeployment(); | ||
} | ||
}, | ||
deploy: function (options, done) { | ||
this.copyOutputToTemporaryDirectory(options); | ||
@@ -21,0 +31,0 @@ this.findAndReplaceEnvironments(options); |
@@ -12,3 +12,3 @@ { | ||
"description": "Automated application modification and deployment for multiple environments.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"dependencies": { | ||
@@ -15,0 +15,0 @@ "mkdirp": "0.5.0", |
@@ -24,4 +24,6 @@ [![NPM](https://nodei.co/npm/grunt-deploy-to-env.png?compact=true)](https://www.npmjs.com/package/grunt-deploy-to-env) [![Build Status](https://travis-ci.org/BBCVisualJournalism/grunt-deploy-to-env.svg?branch=master)](https://travis-ci.org/BBCVisualJournalism/grunt-deploy-to-env) | ||
], | ||
beforeDeployment: function () { | ||
// perform some checks before allowing deployment | ||
beforeDeployment: function (done) { | ||
// Perform some asynchronous checks before allowing deployment. | ||
// Just call the done() callback when you're done. | ||
done(); | ||
} | ||
@@ -54,6 +56,4 @@ } | ||
#### beforeDeployment | ||
Callback function (optional) which is executed before the deployment steps are executed. | ||
Callback function (optional) which is executed before the deployment steps are executed. You must call the passed callback (see example) to inform grunt-deploy-to-env that you've completed your pre-deployment steps. | ||
*@TODO - it would be nice to make this more of a feature, e.g. return true to confirm the `beforeDeployment` check went OK, or return false to indicate there was a problem and that the deployment steps should not be taken. Watch this space.* | ||
## Directory structure | ||
@@ -60,0 +60,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26720
301