How to get classes within a specific folder instead of with a prefix/suffix?
See original GitHub issueI’d like to generate .tsx files from MyProject.Core.Models
and MyProject.Api.Controllers
, regardless of having a naming convention to them. Is it possible?
Something like:
$Classes(Models/*)[
export class $Name {$Properties[
$name$TypeFormatted: $Type;]
}
]
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
How to get list of classes with specific prefix from a result ...
Firstly: Your regex missed a _ character, use: /some_class_\d+/ instead. If you have a collection array of jQuery objects (elements) and you ...
Read more >cp - Copy files with match prefix AND suffix with shell script
This would match all filenames starting with the string aaa and ending in the string .png and copy them all to the directory...
Read more >Better naming convention
The idea that you don't need the 'i' prefix on an interface is missing one important point - interface names share the same...
Read more >java.nio.file.Files Class
As we can see, we can pass folder and file name in Paths.get() ... and generates the file name using given prefix and...
Read more >Organizing objects using prefixes
You can use prefixes to organize the data that you store in Amazon S3 buckets. A prefix is a string of characters at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You should be able to do the following
Which will get all classes with matching namespace.
I can’t find it @vcardins. So here is what I use
I define this in TypewriterAttributes.cs
Then I put the attribute on the classes and enums I need to show up in typescript.
Then I use the following to pick up the attribute in the .TST file
and then in the body of the .TST file I do this:
The namespace is because I put all my interfaces into a common namespace called SkycourtApi. The interfaces are the definitions from C# that don’t have any code, they are just the shape of the classes. Same with Enums.
Hope this gets you on your way. I couldn’t imagine doing this stuff in C# without Typewriter.