Manweill / swagger-axios-codegen

swagger client to use axios and typescript
MIT License
306 stars 83 forks source link

A couple of suggestions #14

Closed lamuertepeluda closed 5 years ago

lamuertepeluda commented 5 years ago

Hi @Manweill ,

it's me again. Since I found it hard debugging for #13 , I have a couple of improvements that I'd suggest you to add when you have time.

Add Source Maps

I suggest you to add a tsconfig.json file with compilerOptions.sourceMap: true, or alternatively add --sourceMap=true to the build npm script.
Other useful options for optimizing the build and source files are here

Template with a template library

I saw many templates defined as JS/TS template strings in template.ts. However they are hardly readable. Maybe using a template library such as hanldebarsjs and having separated files for each template can improve readability and debugging of this important part of the code.

Manweill commented 5 years ago

Hi @lamuertepeluda In previous versions, the swagger-axios-codegen had sourceMap in lib. However, I also use yarn link to debugging. And then,I delete the sourceMap in package. I will add sourceMap in next version.

About template library, welcome PR.