joi-to-typescript icon indicating copy to clipboard operation
joi-to-typescript copied to clipboard

Map output file and type name to custom string

Open mkubliniak opened this issue 3 years ago • 5 comments

Adding possibility to map types and file names with a mapping function to allow different naming schemas.

E.g., by us, we uppercase the first letter of the exported variable name and add Types suffix to the filename.

mkubliniak avatar Apr 08 '21 13:04 mkubliniak

Codecov Report

Merging #84 (b81e8df) into master (3439265) will decrease coverage by 0.26%. The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
- Coverage   98.53%   98.27%   -0.27%     
==========================================
  Files           7        7              
  Lines         342      347       +5     
  Branches      107      108       +1     
==========================================
+ Hits          337      341       +4     
- Misses          5        6       +1     
Impacted Files Coverage Δ
src/types.ts 100.00% <ø> (ø)
src/analyseSchemaFile.ts 98.14% <80.00%> (-1.86%) :arrow_down:
src/index.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3439265...b81e8df. Read the comment docs.

codecov[bot] avatar Apr 08 '21 14:04 codecov[bot]

Another good looking change, I'll check it out too

mrjono1 avatar Apr 08 '21 14:04 mrjono1

I forgot to say I have had a look at this and I like the idea, I have branched of this and added some tests to it and made the custom function do a bit more. I had some issues getting the code back to github, I'll try working on it again.

mrjono1 avatar May 01 '21 11:05 mrjono1

Can we go back to this idea? I'd gladly help, if any help needed here

mutantcornholio avatar Nov 09 '22 17:11 mutantcornholio

yes, I still think this is a great idea. here is the branch I started based on this code https://github.com/mrjono1/joi-to-typescript/compare/master...name-function I can't remember what I was doing here

mrjono1 avatar Nov 09 '22 21:11 mrjono1