This package has been deprecated

Author message:

please use hadouken-js-adapter

grunt-openfin

1.0.3 • Public • Published

grunt-openfin

Build Status

You will be able to configure and install specific versions of the OpenFin Runtime and change application configuration details.

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-openfin --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-openfin');

The "openfin" task

Overview

In your project's Gruntfile, add a section named openfin to the data object passed into grunt.initConfig().

grunt.initConfig({
  openfin: {
    options: {
      // Task-specific options go here.
    },
  },
});

Usage Examples

Basic Usage

In this example we will have two options, one will start the OpenFin Runtime for a application config hosted in http://localhost:3000/app.json, the other will not take any action.

grunt.initConfig({
    openfin: {
        options: {
            configPath: 'http://localhost:3000/app.json'
        },
        serve: {
            open: true
        },
        build: {
            open: false
        }
    }
});
 
grunt.registerTask('serve', ['openfin:serve']);
grunt.registerTask('build', ['openfin:build']);
 

Usage with Application Config

In this example we will have the plugin create and update a config file and launch the OpenFin runtime.

grunt.initConfig({
    openfin: {
        options: {
            configPath: 'http://localhost:3000/app.json'
            config: {
                create: true,
                filePath: 'public/app.json',
                options: {
                    startup_app: {
                        name: 'MyAppName',
                        url: 'http://localhost:3000/index.html',
                        applicationIcon: 'http://localhost:3000/img/icon.ico'
                    },
                    shortcut: {
                        icon: 'http://localhost:3000/img/icon.ico'
                    }
 
                }
            }
        },
        serve: {
            open: true,
        },
        build: {
            open: false,
            config: {
                create: false
            }
        }
    }
});
grunt.registerTask('serve', ['openfin:serve']);
grunt.registerTask('build', ['openfin:build']);

Options

options.open

Type: Bool

Default value: true

Determines if the OpenFin runtime will be launched on start.

options.configPath

Type: String

Default value: ''

Examples:

'http://localhost:3000/app.json'
'file:/C:/helloWorld/app.json'

The location of the config file hosted or the file path.

options.config

Type: Object

Default value: {}

This object will be used to construct/update OpenFin application configs.

options.config.create

Type: Bool

Default value: false

Determines if the application config file will be created if not present.

options.config.filePath

Type: String

Default value: ''

File path location to the application config file.

options.config.options

Type: object

Default value: {}

OpenFin Application Configuration object as described in the OpenFin config file API docs.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i grunt-openfin

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • yoge-openfin
  • nil.ffej
  • gilesstevenson-openfin
  • eheyder
  • newaz.sharif
  • efraim-herstic
  • royhafin
  • openfincolinhu
  • openfin-johans
  • alan15008
  • openfin-ci-gh
  • hina-khalid
  • ife-dev1
  • mjosling
  • elliott.burr
  • vsaw3
  • aykochubey
  • gallak-openfin
  • galim.kaudinov
  • dewinner
  • hzhi0209
  • andy.westacott
  • __tomasz__
  • cameronopenfin
  • jennrondeau
  • dhilan
  • benstubbington
  • davidcoxon-of
  • openfin-jeff
  • gouthamc
  • hannahmcmillen
  • xyopenfin
  • smocarski
  • eugeneross-openfin
  • imansuri
  • manamiueda
  • sakibahmad
  • shahossain
  • openfinbrandon
  • pierrebaize
  • noyangunday
  • michaelmcoates
  • johnmandia-openfin
  • rdepena
  • tgoc99
  • wenjunche
  • harsimran.openfin.singh
  • luiemilio
  • licui3936
  • connormccafferty
  • adam.saland
  • openfin-ci
  • chrishobsonexpero
  • richbrowne-openfin
  • azizyok
  • openfin-gavin
  • oblarg