vokal / Cat2Cat

Creates a category on UIImage from Asset Catalogs in order to reduce typos and enable auto-complete with image names.
MIT License
46 stars 11 forks source link

Stray comma in Cat2CatImageName enum #31

Open brockboland opened 8 years ago

brockboland commented 8 years ago

I'm not sure yet what's causing this, but I'm getting an extra, stray comma below "Contents.json" in the Cat2CatImageName enum, which causes a compile error.

enum Cat2CatImageName: String {
    case
    // IMAGES
    // Contents.json
,
    // Tabs
    AccountTab = "AccountTab",
    DashboardTab = "DashboardTab",
    NotificationsTab = "NotificationsTab"    // Contents.json

}

My Images.xcassets is pretty basic:

screen shot 2015-11-13 at 4 13 59 pm

brockboland commented 8 years ago

Update: it's Contents.json that's causing problems. I had one at the top level inside Images.xcassets, which is not present in the Swift tests in this repo. Things seem to work fine without it, so I just removed that file.

I don't have time to dig into this further at the moment, but I'm guessing that VICatalogWalker should be ignoring Contents.json. The sample iOS Swift project does not include Contents.json comments like the output I included in the original issue above, but I found that if I add another folder to Icons.xcassets in that project and build, the Cat2CatImageName enum becomes littered with references to the JSON.

designatednerd commented 8 years ago

Ahhhhh, yeah that'd do it. I'll try to take a look at this.