apla / me.apla.cordova.app-preferences

App preferences plugin for cordova
Apache License 2.0
201 stars 209 forks source link

Version on plugin registry does not match any public repo commit #18

Closed nleclerc closed 9 years ago

nleclerc commented 9 years ago

I've just installed the plugin through the plugin registry (cordova plugin add me.apla.cordova.app-preferences) and i got v0.4.2.

I tried to follow instructions but when i executed build-app-settings i got the following error:

/Volumes/Storage/nicolas/Development/projects/coqs/launcher/plugins/me.apla.cordova.app-preferences/bin/build-app-settings.js:27
            toggle: {
            ^^^^^^
SyntaxError: Unexpected identifier
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

The error is quite obvious in the offending code:

#!/usr/bin/env node

var fs     = require('fs');
var plist  = require('plist');
var libxml = require('libxmljs');

function ucfirst(s) {
    return s.charAt(0).toUpperCase() + s.substring(1);
}

function SettingsGenerator () {

    this.config = {
        ios: {
            root: "PreferenceSpecifiers",
        },
        types: {
            group: {
                iosType: "PSGroupSpecifier",
            },
            select: {
                iosType: "PSMultiValueSpecifier",
            },
            radio: {
                iosType: "PSRadioGroupSpecifier",
            } // <----- HERE A MISSING COMMA
            toggle: {
                iosType: "PSToggleSwitchSpecifier",
                types: "boolean",
            },
            text: {
                iosType: "PSTextFieldSpecifier",
                types: "string",
            },
            slider: {
                iosType: "PSSliderSpecifier",
                types: "float",
            }

        }

    };
}

...

I was gonna fix it but i couldn't find the code in the repo. I checked the whole history and i didn't find any trace of the offending code.

Which leads to a big question, where does the plugin registry version come from ?

apla commented 9 years ago

fixed with plugin version 0.4.4

nleclerc commented 9 years ago

Cool, thx.

On Thu, 12 Mar 2015 at 09:04 ivan baktsheev notifications@github.com wrote:

Closed #18 https://github.com/apla/me.apla.cordova.app-preferences/issues/18.

— Reply to this email directly or view it on GitHub https://github.com/apla/me.apla.cordova.app-preferences/issues/18#event-250701217 .