xidanko/ts-enums-generator
最新稳定版本:v1.0.2
Composer 安装命令:
composer require xidanko/ts-enums-generator
包简介
Generates typescript enums from php enums.
关键字:
README 文档
README
ts-enums-generator is a Laravel package that generates TypeScript enums from PHP enums. It replicates the folder structure of the source directory using customizable naming conventions.
Installation
To install the package, use Composer:
composer require xidanko/ts-enums-generator
Configuration
You can publish the configuration file using the following command:
php artisan vendor:publish --tag=ts-enums-generator-config
Usage
To generate TypeScript enums from PHP enums, use the following command:
php artisan ts-enums:generate --source=[default: "app/Enums"] --destination=[default: "resources/ts/enums"]
Options
--source: The directory containing the PHP enums. This option has a default value that can be set in the configuration file.--destination: The directory where the TypeScript enums will be generated. This option has a default value that can be set in the configuration file.
Customization
You can customize the naming conventions for the created folders and files using the configuration file. The package will replicate the folder structure of the source directory using the provided naming conventions.
Available naming conventions are: kebab, snake, studly, and camel.
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 42
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-04