David Jennes
0eb0dec554
Switch to Stencil's LazyValueWrapper
2022-07-31 16:26:14 +02:00
David Jennes
4d1d3591c7
Bump year
2022-07-30 20:47:39 +02:00
David Jennes
492bfa34f9
XCAssets: deprecate resourceCount in context
2022-07-30 04:48:02 +02:00
David Jennes
31ed50836c
Parse derived attr. info from model
2022-07-26 02:57:57 +02:00
David Jennes
cb2a69d77f
Fix issues in codebase
2022-07-26 02:46:37 +02:00
Craig Siemens
9cff102102
Added parsing to try and parse the comment from the strings file.
2022-07-23 15:21:35 +02:00
David Jennes
e7c4cf6560
Merge branch 'develop' into feature/file-resources
...
# Conflicts:
# .swiftpm/xcode/xcshareddata/xcschemes/swiftgen.xcscheme
# Sources/SwiftGenCLI/templates/files/flat-swift4.stencil
# Sources/SwiftGenCLI/templates/files/flat-swift5.stencil
# Sources/SwiftGenCLI/templates/files/structured-swift4.stencil
# Sources/SwiftGenCLI/templates/files/structured-swift5.stencil
# Sources/TestUtils/TestsHelper+Context.swift
# SwiftGen.xcodeproj/project.pbxproj
# Tests/TemplatesTests/TestsHelper.swift
2021-04-12 04:50:18 +02:00
David Jennes
dbc7218135
Update SwiftLint
2021-04-11 23:51:17 +02:00
David Jennes
79126d9d28
Rework parser to generate groups, drop the custom options
2020-10-18 01:26:09 +02:00
David Jennes
36be7ae3d7
Merge branch 'develop' into feature/file-resources
...
# Conflicts:
# CHANGELOG.md
2020-10-17 17:42:54 +02:00
David Jennes
47506411fd
Parser: process symbol sets
2020-10-07 22:38:37 +02:00
Mike Gray
06d0693eb3
Add parser options relativeTo and compact
...
- `relativeTo` allows explicitly specifying a directory parsed files should be in relation to
- `compact` eliminates nested common ancestors where the directory only contains another directory
2020-08-30 16:48:24 -04:00
Mike Gray
a6f5713279
Rename dirs to directories. Add more context to README
2020-08-30 08:53:22 -04:00
Mike Gray
08304d71ed
Lowercased string comparisons
2020-08-30 08:45:50 -04:00
Mike Gray
239350884e
Remove structured option in favor of template manipulation
...
- Don't use a parser option to affect the output of the context
- Only output structured data in the context
- Handle context manipulation in the template, i.e. flattening the hierarchy
2020-08-29 16:59:34 -04:00
Mike Gray
d8599eb2bd
Rename file to match convention
2020-08-29 15:27:40 -04:00
Mike Gray
2888a1cdfa
Add structured directory context and template
2020-08-29 13:33:55 -04:00
Mike Gray
ffff9dddb0
Change path string to components array. Drop parent directory
2020-08-29 11:05:58 -04:00
Mike Gray
92ae0a50f3
Merge remote-tracking branch 'SwiftGen/develop' into feature/file-resources
2020-08-29 08:26:52 -04:00
Mike Gray
a8da9e67b7
[WIP] Renamed Resources to Files
...
- Add `path` and `mimeType` to `File` type
- Recursively parse files
- Start writing tests for parser
2020-07-31 18:37:42 -04:00
Mike Gray
b819b8a3db
Merge branch 'develop' into feature/file-resources
2020-07-31 10:43:11 -04:00
Olivier Halligon
de3e9d7a6f
More secure TestHelper using ContextConvertible
...
The small drawback of this is that we end up with `public protocol ContextConvertible` in SwiftGenKit framework which is in practice used as a marker just for tests.
But at least that avoids any test _crash_ in case a case goes wrong, and avoids the risk of false positives in tests by restricting the tests to try to convert to Dict only when allowed.
- Without this, there would be a risk that 2 objects of unhandled class (be it a public class or some internal Swift object like `__StringStorage` or similar) would end up being tried to be converted into NSDictionary, and if those unhandled classes have no `Mirror.Children` with public labels, that will make the test crash instead of failing.
- With this marker protocol, we ensure that only the types we have marked as `ContextConvertible` will be decoded to dictionaries by the tests
2020-07-11 23:08:21 +02:00
David Jennes
215b4134ee
Update year to 2020
2020-07-05 19:34:22 +02:00
David Jennes
bdeadc584f
Reuse lazy document instance
2020-07-05 17:51:44 +02:00
Mike Gray
7608cb9ac9
Merge branch 'develop' into feature/file-resources
2020-06-25 12:40:59 -04:00
David Jennes
df3b071d44
Apply change to plist & json parsers
2020-06-24 17:42:26 +02:00
Marcelo Fabri
518bf4183d
Lazily evaluate metadata in Yaml parser
2020-06-24 17:41:35 +02:00
David Jennes
5327ebe914
Move SGK context files
2020-06-24 16:56:20 +02:00
David Jennes
c091be6488
Add "deprecated" keyword in code comment
2020-06-24 15:55:21 +02:00
David Jennes
9b783b53c0
Update plist context to match json changes
2020-06-24 15:53:04 +02:00
David Jennes
8475ea1b1e
Consistent doc file naming
2020-06-24 03:52:30 +02:00
Marcelo Fabri
6e5760d5ff
Add document key
2020-06-23 13:25:15 -07:00
Marcelo Fabri
96cd83d70e
Add comment
2020-06-23 13:25:15 -07:00
Marcelo Fabri and Olivier Halligon
4e1c437549
Update Sources/SwiftGenKit/Stencil/JSONContext.swift
...
Co-authored-by: Olivier Halligon <olivier@halligon.net >
2020-06-23 13:25:15 -07:00
Marcelo Fabri
a89954ce97
Update JSON.File to store a single document
2020-06-23 13:25:15 -07:00
Marcelo Fabri
fff7fd82ab
Use JSONSerialization to parse JSON instead of Yams
...
Fixes #698
2020-06-23 13:25:13 -07:00
David Jennes
7362db4171
autocorrect
2020-02-28 00:33:33 +01:00
Mike Gray
2251f2f4cf
Updates to parser, swift 5 template, tests for template
2019-12-20 00:07:32 -05:00
Michael Gray
a6f042bb89
[WIP] Starting commit
2019-12-19 18:27:35 -05:00
David Jennes
4bff357830
Rename Constants.Item.type to Constants.Item.typeName for clarity
2019-03-10 01:48:48 +01:00
David Jennes
fbdc7528bf
Use Constants.Item instead of String
2019-03-09 14:40:26 +01:00
David Jennes
dde159789d
Add a total count per asset type
2019-03-09 14:39:43 +01:00
David Jennes
183dc4737a
Refactor & simplify SGK asset catalog code
2019-03-09 14:39:43 +01:00
David Jennes
f59ff38d29
Add parser code
2019-03-09 14:39:43 +01:00
David Jennes
f40c0071a6
Only enable opt-in rules (+ found some more!)
2019-01-28 21:42:05 +01:00
David Jennes
ae6313f70e
Enable some new swiftlint rules
2019-01-08 23:01:04 +01:00
David Jennes
29e335c240
Remove duplicate context documentation
2018-12-31 21:29:29 +01:00
David Jennes
068bc70730
Update copyright notices
2018-12-31 21:26:06 +01:00
David Jennes
2dbf14bfbc
small tweaks
2018-12-26 23:27:47 +01:00
David Jennes
efe809c40f
Enable codgen only for entities when it wouldn't conflict with Xcode
2018-12-26 22:03:04 +01:00