openfin-cli
Advanced tools
Comparing version 0.0.10 to 0.1.0
@@ -15,2 +15,7 @@ #!/usr/bin/env node | ||
'-l --launch launch this configuration', | ||
'-i --installer a url to an OpenFin config file ', | ||
'-h --hyperlink return a url to stdout pointing to the OpenFin installer webservice', | ||
'-d --destination write the results of -i to disk using this path', | ||
'--version current version of the tool', | ||
@@ -17,0 +22,0 @@ 'Example', |
34
index.js
@@ -18,9 +18,37 @@ 'use strict'; | ||
writeToConfig(name, url, config, function() { | ||
writeToConfig(name, url, config, function(configObj) { | ||
if (launch) { | ||
launchOpenfin(config); | ||
} | ||
fetchInstaller(flags, configObj); | ||
}); | ||
} | ||
function fetchInstaller (flags, configObj){ | ||
var installer = flags.i || flags.installer, | ||
hyperlink = flags.h || flags.hyperlink, | ||
destination = flags.d || flags.destination, | ||
name = flags.n || flags.name || configObj.startup_app.name || 'openfin', | ||
openfinInstaller = require('openfin-installer')(configObj); | ||
if (destination){ | ||
openfinInstaller | ||
.fetchInstaller({ | ||
destination: destination | ||
}) | ||
.then(function(){ | ||
console.log('Installer zip written to', destination); | ||
}, | ||
function(reason){ | ||
console.log(reason); | ||
}); | ||
} | ||
if (hyperlink){ | ||
console.log('\n',openfinInstaller.generateInstallUrl(name, installer), '\n'); | ||
} | ||
} | ||
//makeshift is object empty function | ||
@@ -74,5 +102,5 @@ function isEmpty(flags) { | ||
console.log(err); | ||
}).done(function() { | ||
}).done(function(configObj) { | ||
console.log(actionMessage, path.resolve(config)); | ||
callback(); | ||
callback(configObj); | ||
}); | ||
@@ -79,0 +107,0 @@ }); |
{ | ||
"name": "openfin-cli", | ||
"version": "0.0.10", | ||
"version": "0.1.0", | ||
"description": "OpenFin Runtime cli tool", | ||
@@ -20,4 +20,3 @@ "homepage": "http://www.openfin.co", | ||
"keywords": [ | ||
"openfin-cli", | ||
"" | ||
"openfin-cli" | ||
], | ||
@@ -27,2 +26,3 @@ "dependencies": { | ||
"openfin-config-builder": ">=1.0.6", | ||
"openfin-installer": ">=0.1.0", | ||
"openfin-launcher": ">=0.2.0" | ||
@@ -43,8 +43,8 @@ }, | ||
"test": "grunt", | ||
"prepublish" : "node download-rvm.js" | ||
"prepublish": "node download-rvm.js" | ||
}, | ||
"bin": { | ||
"openfin": "cli.js", | ||
"OpenFinRVM" : "OpenFinRVM.exe" | ||
"OpenFinRVM": "OpenFinRVM.exe" | ||
} | ||
} |
@@ -60,2 +60,25 @@ # OpenFin Runtime cli tool | ||
####Generate installer URL | ||
Will print a url to the console with the name from your config file and the hosted confg | ||
file url provided via the `-i` or `--installer` flag | ||
````sh | ||
$ openfin --hyperlink --installer http://goo.gl/w2747v | ||
```` | ||
Shorthand | ||
````sh | ||
$ openfin -h -i http://goo.gl/w2747v | ||
```` | ||
####Download an installer zip locally | ||
Use the `-d` or `--destination` flag to specify the directory of the download. To download to the current directory use `-d .` or `--destination .` | ||
````sh | ||
$ openfin --destination my-dist-directory --installer http://goo.gl/w2747v | ||
```` | ||
Shorthand | ||
````sh | ||
$ openfin -d my-dist-directory -i http://goo.gl/w2747v | ||
```` | ||
## License | ||
@@ -62,0 +85,0 @@ |
Sorry, the diff of this file is not supported yet
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
1997134
119
94
4
+ Addedopenfin-installer@>=0.1.0
+ Addedopenfin-installer@0.1.2(transitive)