typescript-types-separator

0.1.0 • Public • Published

Break your single Types file into many separate ones

This lib was built to help out when you want to keep a certain standard for your type files, but they are generated by a tool that does not support separating a single type per file. A concrete example is that when I was building a service using OpenAPI yaml, I wanted to code once, and have my typescript files updated. But the tool to output the types only does it for a single file.

Usage

You can use a config file currently to setup source and output. Just place a json file named "types-separator.json" on the root where the command should run, and it will be picked up. Please follow this format:

  {
    "source": "../path/to/your/source/files",
    "output": "../path/for/output/",
    "formatCode": true
  }
  • formatCode currently is a flag to run prettier on the resulting code;
  • Tests have not been implemented yet;

Readme

Keywords

none

Package Sidebar

Install

npm i typescript-types-separator

Weekly Downloads

0

Version

0.1.0

License

ISC

Unpacked Size

34.3 kB

Total Files

13

Last publish

Collaborators

  • aloisioaw