function buildTargetSpec (runOptions) {
    const spec = {};
    if (runOptions.target) {
        spec.id = runOptions.target;
    } else if (runOptions.device) {
        spec.type = 'device';
    } else if (runOptions.emulator) {
        spec.type = 'emulator';
    }
    return spec;
}
Builds a target spec from a runOptions object

@param {{target?: string, device?: boolean, emulator?: boolean}} runOptions
@return {target.TargetSpec}