xidanko/ts-enums-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-04