-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work on code generation for C# / .NET (MAUI) #1162
Conversation
chore: formatting-only changes for JS/MD files and pkg json
chore: bump husky, change precommit hook, eslint scripts
Version Packages (prerelease)
V3 fixes port
Co-authored-by: Ioannis Chrysostomakis <ic768@protonmail.com>
Forward port of bugfix and grammar fix in v3
Version Packages (prerelease)
feat: add preprocessors
chore: remove es6 helpers and use actual ES6
Fix tests & slight API changes
Version Packages (prerelease)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: update docs styles and migration link * chore: remove vulnerable dependencies, update contributing.md
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
What I am struggling with, is
The use case is this:
|
* @typedef {import('../../../../types/File.d.ts').File} File | ||
* @typedef {import('../../../../types/Config.d.ts').LocalOptions} LocalOptions | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
@@ -157,5 +157,13 @@ | |||
"unist-util-visit": "^5.0.0", | |||
"uuid": "^9.0.1", | |||
"yaml": "^2.3.4" | |||
}, | |||
"mocha": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool, then we can also remove these params in the scripts['test:node']
for brevity right?
It sounds like what you're looking for is something that is similar to |
const file = setCSharpFileProperties({ | ||
accessModifier: 'public', | ||
}); | ||
expect(file.accessModifier).to.equal('public '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(file.accessModifier).to.equal('public '); | |
expect(file.accessModifier).to.equal('public'); |
I think it's better to add the needed whitespace later in the format itself rather than doing it here. A few days ago I refactored all of the existing templates and also this file: https://github.com/amzn/style-dictionary/blob/v4/lib/common/formatHelpers/setSwiftFileProperties.js#L50 and then add the whitespacing here: https://github.com/amzn/style-dictionary/blob/v4/lib/common/templates/ios-swift/any.swift.template.js#L24
*/ | ||
export default function setCSharpFileProperties(options) { | ||
if (typeof options.accessModifier === 'undefined') { | ||
options.accessModifier = 'public '; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.accessModifier = 'public '; | |
options.accessModifier = 'public'; |
options.accessModifier = 'public '; | ||
} else { | ||
if (options.accessModifier !== '') { | ||
options.accessModifier = `${options.accessModifier} `; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.accessModifier = `${options.accessModifier} `; | |
options.accessModifier = `${options.accessModifier}`; |
I reviewed your PR thusfar and it looks great! let me know if there's anything I can help with, you can also reach me on Slack if you wanna have a call at some point to flesh out some of the details |
Issue #, if available: #977
Description of changes:
Export tokens to C# class format, so that they are also usable in C#, and so that you can generate compilable code. This is intended to be usable in .NET MAUI.
Color
number
s /dimension
sstring
shadow
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.