path-types

1.0.4 • Public • Published

Path Types

Easily generate path name types

Usage

❯ npx path-types --help

Usage: path-types [options]

Generate file path types

Options:
  -d, --dir [directory]           Relative path of the directory, whose paths you want to generate (default: current dir)
  -o, --output [output]           Output file location (default: FilePaths.ts)
  -e, --extension [extension...]  File extension, eg. ts, js (default: ts)
  -n, --name [name]               Type name (default: FilePaths)
  -i, --ignore [ignore...]        ignore paths (default: node_modules)
  -w, --watch                     Enable watching (default: disabled)
  -k, --keep                      Keep file extension name (default: disabled)
  -h, --help                      display help for command

Generated

// FilePaths.ts

export type FilePaths =
  | "client"
  | "utils"
  | "cloudsearch/addUser"
  | "cloudsearch/updateUser"
  | "cognito/getUserInfo"
  | "cognito/onUserRegister"
  | "cognito/updateUser"
  | "db/client"
  | "db/dbStreamHandler";

Package Sidebar

Install

npm i path-types

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

26.8 kB

Total Files

6

Last publish

Collaborators

  • shivamjoker