Help run forge to compile and run Trigger.io apps.
Add the following to your package.json
.
"grunt-forge": "git://github.com/MarkBorcherding/grunt-forge.git",
Add the following to your grunt.js
.
grunt.loadNpmTasks('grunt-forge');
grunt.initConfig({
//...
forge: {
ios_build: {
cwd: 'app',
args: ['build', 'ios'],
options: {
username: 'your_trigger_email@example.com',
password: 'your_trigger_password'
}
},
ios_sim: { args: ['run', 'ios'] },
ios_device: { args: ['run', 'ios', '--ios.device', 'device'] },
ios_package: { args: ['package', 'ios'] }
}
//...
});
You can add whatever tasks you want. It doesn't do anything special other than chain the arguments together
and run forge
in the directory specified by cwd.
You only need to add the username
and password
options if their prompts appear when you run forge
manually. If the username and password prompts don't appear, it means your machine stored your login cookies at the TriggerToolkit directory (inside build-tools dir).
Many of the forge
messages are filtered by default and you are left only with the logging messages. You can disable
this by setting verbose:true
as an option.
Create shortcut tasks by giving common tasks easy names.
grunt.registerTask("build", 'coffee compass copy forge:ios_build');
grunt.registerTask("sim", 'build forge:ios_sim');
grunt.registerTask("device", 'build forge:ios_device');
grunt.registerTask("package", 'build forge:ios_package');
The tasks add a bit of color to the output. It also eliminates some noise, and tries to reduce the amount of output tto a more manageable amount. If you're not seeing some output, keep that in mind.
As an example, it strips out some device specific path information and leave the more important bits.