<commit_before>

var   mac = require('./icons.mac')
    , web = require('./icons.web')
    , ios = require('./icons.ios')
    , android = require('./icons.android')
    , windows = require('./icons.windows')

var internal = {};

exports.run = function run(flow, data, done) {

    var prepared = flow.project.prepared.source;

        //don't care if there is no icon node
    var has_icon = (prepared.project.app && prepared.project.app.icon);
    if(!has_icon) {
        return;
    }

    var icon = {
        dest : 'icon',
        source : prepared.project.app.icon
    };

    icon = internal.parse_path(flow, icon);

    icon.source = path.join(prepared.project.app._icon.__path, icon.source);

    prepared.project.app._icon = icon;

    switch(flow.target) {
        case 'mac':
                mac.convert(flow, icon, done);
            break;
        case 'web':
                web.convert(flow, icon, done);
            break;
        case 'ios':
                ios.convert(flow, icon, done);
            break;
        case 'android':
                android.convert(flow, icon, done);
            break;
        case 'windows':
                windows.convert(flow, icon, done);
            break;
        default:{<commit_msg>fix bug where projects without icons stall the build<commit_after>

var   mac = require('./icons.mac')
    , web = require('./icons.web')
    , ios = require('./icons.ios')
    , android = require('./icons.android')
    , windows = require('./icons.windows')

var internal = {};

exports.run = function run(flow, data, done) {

    var prepared = flow.project.prepared.source;


        //don't care if there is no icon node
    var has_icon = (prepared.project.app && prepared.project.app.icon);
    if(!has_icon) {

        if(done) {
            done();
        }

        return;

    } //has_icon

    var icon = {
        dest : 'icon',
        source : prepared.project.app.icon
    };

    icon = internal.parse_path(flow, icon);

    icon.source = path.join(prepared.project.app._icon.__path, icon.source);

    prepared.project.app._icon = icon;

    switch(flow.target) {
        case 'mac':
                mac.convert(flow, icon, done);
            break;
        case 'web':
                web.convert(flow, icon, done);
            break;
        case 'ios':
                ios.convert(flow, icon, done);
            break;
        case 'android':
                android.convert(flow, icon, done);
            break;
        case 'windows':
                windows.convert(flow, icon, done);
            break;
        default:{
{'fraction_non_alphanumeric': 0.13789107763615296, 'fraction_numerical': 0.0, 'mean_word_length': 1.7789699570815452, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5689663', 'n_tokens_mistral': 767, 'n_tokens_neox': 726, 'n_words': 174}