Skip to content

Instantly share code, notes, and snippets.

@lukevers
Created November 6, 2014 21:47
Show Gist options
  • Save lukevers/568a729aa587c3e03cf8 to your computer and use it in GitHub Desktop.
Save lukevers/568a729aa587c3e03cf8 to your computer and use it in GitHub Desktop.
nodejs load aws config from .env.php
gulp.task('aws', function() {
require('child_process').exec(
'php -r \'print json_encode(include(".env.php"));\'',
function (err, stdout, stderr) {
aws = JSON.parse(stdout).AWS;
// Now we have the following structure:
//
// {
// cdn: '',
// key: '',
// secret: '',
// region: '',
// bucket: '',
// folder: ''
// }
//
//
console.log(aws);
}
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment