Parameters
: ensure theflatten
function correctly handles a flag with afalse
value.
David Jennes #108
- Update to SwiftLint 0.30.1 and enable some extra SwiftLint rules.
David Jennes #112 #114
swiftIdentifier
: fix crash on empty string.
David Jennes #105
- Updated Stencil to the latest version (0.13).
David Jennes #103
- Improved the documentation of string filters a bit for a better overview of the inputs & outputs.
David Jennes #102 - Updated to latest Xcode (10.0).
David Jennes #103
- The
set
tag can now directly accept an expression as value, see the documentation for an explanation on how this differs with the normalset
/endset
pair.
David Jennes #87 - Updated Stencil to the latest version (0.12.1).
David Jennes #95 #99
- Fixed using filter expression in call node.
Ilya Puchka #85 - Fixed compilation issue with Xcode 10 & Swift 4.2 by adding hints to help the compiler.
Olivier Halligon #93 - Migrated to PathKit for url filters. The dirname will return '.' for a filename without base directory.
Rahul Katariya Philip Jander #94
- Updated to latest Xcode (9.3.0).
David Jennes #86 - Update to SwiftLint 0.27 and enable some extra SwiftLint rules.
David Jennes #96 - Test Linux SPM support in CI.
David Jennes #90
- Updated Stencil to the latest version (0.11.0).
David Jennes #83
- Switched to using SwiftLint via CocoaPods instead of our own install scripts.
David Jennes #78 - Enabled some extra SwiftLint rules for better code consistency.
David Jennes #79 - Migrated to CircleCI 2.0.
David Jennes #81 - Migrated to Swift 4, and dropped support for Swift 3.
David Jennes #80
- Add
!
counterpart for strings boolean filters.
Antondomashnev #68 - Updated Stencil to the latest version (0.10.1).
Ilya Puchka #73
- Added
Parameters.flatten(dictionary:)
method to do the opposite ofParameters.parse(items:)
and turn a dictionary into the list of parameters to pass from the command line.
Olivier Halligon #70
- Workaround for
parseString
to supportNSString
.
Antondomashnev #68
- Accept
LosslessStringConvertible
input for strings filters.
Antondomashnev #65 StencilContext.enrich
now also accept a Dictionary for specifying parameters (in preparation for supporting Config files in SwiftGen).
Olivier Halligon #66
- Refactoring of
Filters+Strings
.
Antondomashnev #63
- Added the
basename
anddirname
string filters for getting a filename, or parent folder (respectively), out of a path.
David Jennes #60 - Modify the
swiftIdentifier
string filter to accept an optional "pretty" mode, to also apply thesnakeToCamelCase
filter and other manipulations if needed for a "prettier" but still valid identifier.
David Jennes #61
- Ensure
swiftlint
is run usingbundler
.
David Jennes #59
Due to the removal of legacy code, there are a few breaking changes in this new version that affect both template writers as well as developers. We've provided a migration guide to help you through these changes, which you can find here: Migration Guide for 2.0
- The
ParametersError
enum has been replaced by theParameters.Error
nested type.
Olivier Halligon #37 - The
FilterError
enum has been replaced by theFilters.Error
nested type.
Olivier Halligon #37 - The filters in
StringFilters
andNumFilters
are now located underFilters.Strings
andFilters.Numbers
.
Olivier Halligon #40 - Removed the
join
filter, as it's now integrated inStencil
proper.
David Jennes #10 - Refactored the
snakeToCamelCase
filter to now accept an (optional) boolean parameter to control thenoPrefix
behaviour.
David Jennes #41 - Rename the
stringToSwiftIdentifier
function toswiftIdentifier
to better match the other method names.
David Jennes #46
- Added the
contains
,replace
,hasPrefix
,hasSuffix
,lowerFirstLetter
filters for strings.
Antondomashnev #54 - Added the
removeNewlines
filter to remove newlines (and spaces) from a string.
David Jennes #47 #48
- Fix
snakeToCamelCase
parameters information in README.
Liquidsoul #45
- Added camelToSnakeCase filter.
Gyuri Grell #24
- The context enrich function won't overwrite existing values in the
env
andparam
variables.
David Jennes #29
- Further refactor the Rakefile into rakelibs, and add a Gemfile for gem dependencies.
David Jennes #28 #31 - Update Stencil to 0.9.0 and update project to Xcode 8.3.
Diogo Tridapalli #32 - Added documentation for tags and filters.
David Jennes #12
- The
ParametersError
enum has been replaced by theParameters.Error
nested type.ParametersError
still works (it is nowtypealias
) but will be removed in the next major release.
Olivier Halligon - The
FilterError
enum has been replaced by theFilters.Error
nested type.FilterError
still works (it is nowtypealias
) but will be removed in the next major release.
Olivier Halligon
- Switch from Travis CI to Circle CI, clean up the Rakefile in the process.
David Jennes #20 #25 - Fixed SPM dependency in
Package.swift
.
Krzysztof Zabłocki #26
- Added support for Swift Package Manager.
Krzysztof Zabłocki #15 - Added
MapNode
to apply amap
operator to an array. You can now use{% map someArray into result using item %}
to do the equivalent of theresult = someArray.map { item in … }
Swift code.
David Jennes #11 - Add a "parameters parser" able to transform parameters passed as a set of strings
(
a=1 b.x=2 b.y=3 c=4 c=5
) — typically provided as the command line arguments of a CLI — into a Dictionary suitable for Stencil contexts.
David Jennes #8 - Add a
StencilContext.enrich
function to enrich Stencil contexts withparam
andenv
dictionaries.
Theparam
dictionary typically contains parameters parsed via the parameters parser above.
Theenv
dictionary contains all the environment variables. You can thus access them in your templates usingenv.USER
,env.LANG
,env.PRODUCT_MODULE_NAME
, etc.
#19
- Renamed
SwiftTemplate
toStencilSwiftTemplate
.
David Jennes #14 - Refactor stencil swift extensions registration for easier use with an existing
Extension
.
David Jennes #16 - Refactor stencil node tests to not use templates and output files.
David Jennes #17
See SwitftGen's own CHANGELOG pre SwiftGen 4.2 version, before the refactoring that led us to split the code in frameworks