Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
grunt-deploy-to-env
Advanced tools
Automated application modification and deployment for multiple environments.
Allows you to configure and deploy a project to multiple environments. grunt-deploy-to-env takes a folder of files, replaces some of the file contents (e.g. local.com => example.com) then deploys the changed files to a specific location, all without changing the original files. This makes it possible to have one common project and deploy it to multiple environments.
grunt.config(['deploy'], {
live: {
server: '/Volumes/mounts/live_environment',
source: '/Users/foo/Desktop/my_project',
path: '/project-namespace',
replacements: [
{
from: 'http://127.0.0.1:8000',
to: 'http://example.com'
},
{
from: 'Local',
to: 'Live'
}
],
beforeDeployment: function (done) {
// Perform some asynchronous checks before allowing deployment.
// Just call the done() callback when you're done.
done();
}
}
});
With this example, when you run grunt live
you would:
beforeDeployment
function/Users/foo/Desktop/my_project
/Volumes/mounts/live_environment/project-namespace/my_project
, creating the project-namespace
directory if necessary, or overwriting the previous contents if they already existed.Absolute path to the location of your server mount.
Absolute path to the local project.
Relative path to append to the server path. This allows you to deploy to example.com/something, rather than just the root of example.com.
Array of strings to look for and strings to replace them with.
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.
grunt.js
) but could support additional configuration files for Gulp or any other build framework.bin/
.Make sure you have NPM installed. Then it's just a simple case of:
npm install
Run tests as follows:
node_modules/.bin/vows test/vows.js
If tests hang on 'Waiting for tmp directory to clear...', chances are that there is an NPM dependency that is not being fulfilled. If you encounter this:
npm install
If you still have problems:
Error: Cannot find module 'X'
, in which case you should add it to package.json, run npm install
, clear the tmp
directory again and run the tests.FAQs
Automated application modification and deployment for multiple environments.
The npm package grunt-deploy-to-env receives a total of 3 weekly downloads. As such, grunt-deploy-to-env popularity was classified as not popular.
We found that grunt-deploy-to-env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.