-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ios-swift): adding common transforms for Swift in iOS (#255)
fixes: #161
- Loading branch information
1 parent
c7d3c15
commit 749db69
Showing
12 changed files
with
2,866 additions
and
2,423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<% | ||
// | ||
// Copyright 2019 Alaska Air Group or its affiliates. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"). | ||
// You may not use this file except in compliance with the License. | ||
// A copy of the License is located at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// or in the "license" file accompanying this file. This file is distributed | ||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
// express or implied. See the License for the specific language governing | ||
// permissions and limitations under the License. | ||
%> | ||
// | ||
// <%= this.destination %> | ||
// | ||
<% | ||
// for backward compatibility we need to have the user explicitly hide it | ||
var showFileHeader = (this.options && this.options.hasOwnProperty('showFileHeader')) ? this.options.showFileHeader : true; | ||
if(showFileHeader) { | ||
print("// Do not edit directly\n"); | ||
print("// Generated on " + new Date().toUTCString()); | ||
} | ||
%> | ||
// | ||
<% | ||
// Filter to only those props wanted based on the filter, then sort | ||
// them by category so we keep like props together, then by name | ||
// so they are easier to find alphabetically. | ||
var props = _.sortBy(allProperties, item => item.attributes.category + item.name); | ||
%> | ||
|
||
import UIKit | ||
|
||
public class <%= this.className %> { | ||
<%= _.map(props, function(prop) { return 'static let ' + prop.name + ' = ' + prop.value; }).join('\n ') %> | ||
} |
Oops, something went wrong.