Skip to content

Instantly share code, notes, and snippets.

@rdepena
Created December 29, 2014 18:43
Show Gist options
  • Save rdepena/9fcc0ecd5d0172aa371f to your computer and use it in GitHub Desktop.
Save rdepena/9fcc0ecd5d0172aa371f to your computer and use it in GitHub Desktop.
Gulp recipe for the OpenFin toolkit.
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