Christian24 / multi-file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dtsgenerator-multi-file

This is the dtsgenerator plugin. This plugin's description is here.

Install

npm install dtsgenerator-multi-file

Usage

dtsgen.json

{
    "plugins": {
        "dtsgenerator-multi-file": true, // or { config object }
    }
}

Configuration

  • the type of configuration
type Config = {
    map: {
        from: (string | boolean)[];
        to: string[];
    }[];
};
key type description
map Array of object the mapping of replacing.
map.n.from `Array<string boolean>`
map.n.to `Array<string boolean>`
  • Example
{
  "map": [
    {
      "from": ["Components", "Schemas"],
      "to": ["Test", "PetStore"]
    },
    {
      "from": ["Paths"],
      "to": ["Test", "PetStore"]
    }
  ]
}

Development

npm run build
npm test

Stacks

  • TypeScript
  • eslint
  • prettier

Files

  • index.ts: plugin main file
  • test/snapshot_test.ts: test main file. should not edit this file.
  • test/post_snapshots/: post process test patterns. Please add folder if you need.
  • test/pre_snapshots/: pre process test patterns. Please add folder if you need.

npm scripts

main scripts

  • npm run build: transpile this plugin. This command need before publishing this plugin.
  • npm test: test this plugin with coverage.

sub scripts

  • npm run watch: watch editing files for compile.
  • npm run lint:fix: fix lint error automatically.
  • npm run test:update-snapshot: update snapshot files for unit test.
  • npm run coverage: report to coveralls. Need coveralls configuration file.

About


Languages

Language:TypeScript 100.0%