grunt-deploy-to-env
Advanced tools
Comparing version
@@ -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 @@ [](https://www.npmjs.com/package/grunt-deploy-to-env) [](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 @@ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
26720
1.27%301
3.08%