Skip to content

Commit

Permalink
fix(format): issue #295 (#316)
Browse files Browse the repository at this point in the history
* Added public access level to Swift class and enum properties

* fix(format): issue #295
  • Loading branch information
dbanksdesign committed Aug 28, 2019
2 parents efdcc01 + c654648 commit 030175e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions __tests__/formats/__snapshots__/all.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ exports[`formats all should match ios-swift/class.swift snapshot 1`] = `
import UIKit
public class {
static let color_red = #FF0000
public static let color_red = #FF0000
}
"
`;
Expand All @@ -381,7 +381,7 @@ exports[`formats all should match ios-swift/enum.swift snapshot 1`] = `
import UIKit
public enum {
static let color_red = #FF0000
public static let color_red = #FF0000
}
"
`;
Expand Down
2 changes: 1 addition & 1 deletion lib/common/templates/ios-swift/class.swift.template
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
import UIKit

public class <%= this.className %> {
<%= _.map(props, function(prop) { return 'static let ' + prop.name + ' = ' + prop.value; }).join('\n ') %>
<%= _.map(props, function(prop) { return 'public static let ' + prop.name + ' = ' + prop.value; }).join('\n ') %>
}
2 changes: 1 addition & 1 deletion lib/common/templates/ios-swift/enum.swift.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
import UIKit

public enum <%= this.className %> {
<%= _.map(props, function(prop) { return 'static let ' + prop.name + ' = ' + prop.value; }).join('\n ') %>
<%= _.map(props, function(prop) { return 'public static let ' + prop.name + ' = ' + prop.value; }).join('\n ') %>
}

0 comments on commit 030175e

Please sign in to comment.