This is the dtsgenerator
plugin.
This plugin's description is here.
npm install dtsgenerator-multi-file
dtsgen.json
{
"plugins": {
"dtsgenerator-multi-file": true, // or { config object }
}
}
- 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"]
}
]
}
npm run build
npm test
- TypeScript
- eslint
- prettier
index.ts
: plugin main filetest/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 run build
: transpile this plugin. This command need before publishing this plugin.npm test
: test this plugin with coverage.
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.