Created
December 29, 2014 18:43
-
-
Save rdepena/9fcc0ecd5d0172aa371f to your computer and use it in GitHub Desktop.
Gulp recipe for the OpenFin toolkit.
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 gulp = require('gulp'), | |
openfinConfigBuilder = require('openfin-config-builder'), | |
openfinLauncher = require('openfin-launcher'), | |
path = require('path'); | |
function createConfig() { | |
return openfinConfigBuilder.create({ | |
startup_app: { | |
name: 'myApp', | |
url: 'http://openfin.co' | |
} | |
}, 'app.json'); | |
} | |
function updateConfig() { | |
return openfinConfigBuilder.update({ | |
startup_app: { | |
name: 'staging_app' | |
} | |
}, 'app.json'); | |
} | |
function launchOpenfin () { | |
return openfinLauncher.launchOpenFin({ | |
configPath: 'file:/' + path.resolve('app.json') | |
}); | |
} | |
gulp.task('openfin', function() { | |
return createConfig() | |
.then(updateConfig) | |
.then(launchOpenfin); | |
}); | |
gulp.task('default', ['openfin']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment