Interact with your FeedHenry apps from Grunt.
This plugin requires Grunt ~0.4.3
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-fhc --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-fhc');
Targets a given FeedHenry domain
In your project's Gruntfile, add a section named fhctarget
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhctarget: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry Username
Type: String
Default value: ''
A string value that is your FeedHenry password.
Type: String
Default value: ''
A string value that is the FeedHenry domain you wish to target.
grunt.initConfig({
fhctarget: {
options: {
username: 'teddy',
password: 'bear',
domain: 'https://feedhenry.com'
},
task: {
},
},
});
Performs a pull on the specifid remote FeedHenry app. Also will trigger a dev environment deploy
In your project's Gruntfile, add a section named fhcpull
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhcpull: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry App ID
grunt.initConfig({
fhcpull: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95'
},
task: {
},
},
});
Deploys the specified remote app on either dev or live environments
In your project's Gruntfile, add a section named fhcstage
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhcstage: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry App ID
Type: Boolean
Default value: false
A boolean to choose if you want to stage to the Live environment (true), or the Dev one (false)
Type: Boolean
Default value: false
A boolean to choose if you want a clean stage
grunt.initConfig({
fhcstage: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95',
live: true,
clean: false
},
task: {
},
},
});
Creates Local Server For Local Development
In your project's Gruntfile, add a section named fhclocal
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhclocal: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry App ID
Type: String
Default value: ``
A list of comma seperated packages that you want to be applied
Type: String
Default value: '127.0.0.1'
Value to report to the client code, as the location of the cloud code.
Type: Number
Default value: 8001
The port you want to run the local cloud server on.
Type: Number
Default value: 8000
The port you want to run the local client file server on.
Type: String
Default value: '127.0.0.1'
The host running the local redis server
Type: Number
Default value: 6379
The port for the locally running redis server, default: 6379
Type: String
Default value: ''
The password for the local redis server.
Type: Boolean
Default value: true
This parameter specifies whether or not to run the cloud part of the app.
Type: Boolean
Default value: true
Connect to a local database.
Type: Boolean
Default value: false
When set to true, allows connecting a debugger to the node process running the cloud code (passes the --debug
parameter to node)
Type: Boolean
Default value: false
When set to true, allows connecting a debugger to the node process running the cloud code, and waits for the debugger to connect (passes the --debug-brk
parameter to node)
Type: Boolean
Default value: false
When set to true, prevents wrapping the contents of index.html
Type: Boolean
Default value: false
When set to true, stdout
and stderr
messages will be prefixed with their file types - CLOUD stdout:
and CLOUD stderr:
respectively.
Type: Boolean
Default value: true
When set to true, stdout
and stderr
messages will be output in green or red text respectively.
grunt.initConfig({
fhclocal: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95'
},
task: {
},
},
});
Starts a FeedHenry App.
In your project's Gruntfile, add a section named fhcstart
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhcstart: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry App ID
Type: Boolean
Default value: false
Boolean to define if live environment should be started.
grunt.initConfig({
fhcrestart: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95'
},
task: {
},
},
});
Stops a FeedHenry App.
In your project's Gruntfile, add a section named fhcstop
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhcstop: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry App ID
Type: Boolean
Default value: false
Boolean to define if live environment should be stopped.
grunt.initConfig({
fhcstop: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95',
live: true
},
task: {
},
},
});
Restarts a FeedHenry App.
In your project's Gruntfile, add a section named fhcrestart
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhcrestart: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry App ID
Type: Boolean
Default value: false
Boolean to define if live environment should be restarted.
grunt.initConfig({
fhcrestart: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95'
},
task: {
},
},
});
Restarts a FeedHenry App.
In your project's Gruntfile, add a section named fhcbuild
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhcbuild: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
Destination is the platform you are building for. It is one of: andriod, iphone, ipad, ios(for universal binary), blackberry, windowsphone7
Type: String
Default value: ''
Version is specific to the destination (e.g. Android version 4.0)
Type: String
Default value: 'debug'
Config is the type of the build, either 'debug', 'distribution', or 'release'
Type: String
Default value: ''
only needed for 'release' builds, it's your private key password
Type: String
Default value: ''
only needed for 'release' builds, it's your cert password
Type: Boolean
Default value: false
Flag to choose if you download the built package
Type: String
Default value: ''
this is the path to your provisioning profile
grunt.initConfig({
fhcbuild: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95',
destination: 'ios'
},
task: {
},
},
});
Undeploys a FeedHenry App.
In your project's Gruntfile, add a section named fhcundeploy
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
fhcundeploy: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
A string value is your FeedHenry App ID
Type: Boolean
Default value: false
Boolean to define if live environment should be undeployed.
Type: String
Default value: 'cloud'
The app type to undeploy, can be 'cloud' or 'embed'
grunt.initConfig({
fhcundeploy: {
options: {
appid: 'cCyusU-ruIMAuyWerBMYvv95'
},
task: {
},
},
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Lint your code using Grunt.