blackberry-build

Grunt plugin to package web apps using the BlackBerry Web Works SDK

blackberry-build

Grunt plugin to package web apps using the BlackBerry Web Works SDK. Includes two tasks, 'bb_package_bar' and 'bb_deploy_bar'.

This plugin requires Grunt ~0.4.1

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 blackberry-build --save-dev

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

grunt.loadNpmTasks('blackberry-build');

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

grunt.initConfig({
  bb_package_bar: {
    options: {
        sdk: 'PATH_TO_YOUR_WEBWORKS_SDK'
    },
    with_password: {
        options:{
            keypass: 'MY_KEYPASS',
            flags: '-d'
        }
        src: 'test/sample',
        dest: 'tmp'
    }
  }
})

Type: String Default value: ``

The path to your Web Works SDK

Type: String Default value: ``

Your certificate keypass used to sign the bar file

Type: String Default value: ``

Any additional script flags you'd like to pass, like '-d' to enable remote debugging

Type: String Default value: ``

The project source to package

Type: String Default value: ``

The destination directory to output the device/simulator bar files

Package up the test/sample folder into the tmp directory

grunt.initConfig({
  bb_package_bar: {
    options: {
        sdk: 'PATH_TO_YOUR_WEBWORKS_SDK'
    },
    sample: {
        src: 'test/sample',
        dest: 'tmp'
    }
  }
})

Package up the test/sample folder into the tmp directory using a keypass for signing and an additional compiler flag

grunt.initConfig({
  bb_package_bar: {
    options: {
        sdk: 'PATH_TO_YOUR_WEBWORKS_SDK'
    },
    with_password: {
        options:{
            keypass: 'MY_KEYPASS',
            flags: '-d'
        }
        src: 'test/sample',
        dest: 'tmp'
    }
  }
})

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

grunt.initConfig({
  bb_deploy_bar: {
    options: {
        sdk: 'PATH_TO_YOUR_WEBWORKS_SDK'
    },
    sample: {
        options:{
            password: 'MY_DEVICE_PASSWORD'
        }
        ip: '172.16.154.128',
        bar: 'tmp/simulator/sample.bar'
    }
  }
})

Type: String Default value: ``

The path to your Web Works SDK

Type: String Default value: ``

Your device password which you are deploying to

Type: String Default value: ``

The ip address of the device or the simulator you'd like to deploy the bar file to

Type: String Default value: ``

The bar file package you want to deploy

Deploy the simulator built bar file to the ip address supplied by your simulator

grunt.initConfig({
  bb_deploy_bar: {
    options: {
        sdk: 'PATH_TO_YOUR_WEBWORKS_SDK'
    },
    to_simulator: {
        ip: '172.16.154.128',
        bar: 'tmp/simulator/sample.bar'
    }
  }
})

Deploy the device built bar file to the ip address of your device using your device password

grunt.initConfig({
  bb_deploy_bar: {
        options: {
            sdk: 'PATH_TO_YOUR_WEBWORKS_SDK'
        },
        to_device: {
            options: {
                password: 'MY_DEVICE_PASSWORD'
            },
            ip: '169.254.0.1',
            bar: 'tmp/device/sample.bar'
        }
    }
})