Last active
August 29, 2015 14:22
-
-
Save abeisgoat/654aaeaabc3e4442e3ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var spawn = require('child_process').spawn; | |
module.exports = { | |
deploy: function (email, password) { | |
var login = spawn.bind(spawn, 'firebase', ['login', '--email='+email, '--password='+password]), | |
push = spawn.bind(spawn, 'firebase', ['deploy']); | |
login().stdout.on('data', function(chunk) { | |
if (chunk.toString() == "Login Successful\n") { | |
push().stdout.on('data', function (chunk) { | |
console.log(chunk.toString()) | |
}); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment