amzn/style-dictionary

View on GitHub
examples/advanced/tokens-deprecation/templates/ios-plist.template

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

<% _.each(allProperties, function(prop) {
    // NOTICE: this is a simplified version of a PLIST file for iOS
    // please refer to the documentation for a proper format
    // or speak with one of your iOS developers to agree on a format that works for them
    var output = "";
    output += "\t<key>" + prop.name + "</key>\n";
    output += "\t<dict>\n";
    output += "\t\t<key>value</key><string>" + prop.value + "</string>";
    if(prop.comment) {
    output += " <!-- " + prop.comment + " -->";
    }
    output += "\n";
    if(prop.deprecated) {
    output += "\t\t<key>deprecated</key><true/>";
        if(prop.deprecated_comment) {
            output += " <!-- " + prop.deprecated_comment + " -->";
        }
    output += "\n";
    }
    output += "\t</dict>\n\n";
    print(output);
}); %>

</dict>
</plist>