Skip to content

Commit 6e579fa

Browse files
Update readme and base config
1 parent 7a7e322 commit 6e579fa

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

README.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# This is my package enum-convertor-laravel
1+
# Enum Convertor for Laravel
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/likeadeckofcards/enum-convertor-laravel.svg?style=flat-square)](https://packagist.org/packages/likeadeckofcards/enum-convertor-laravel)
44
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/likeadeckofcards/enum-convertor-laravel/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/likeadeckofcards/enum-convertor-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)
55
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/likeadeckofcards/enum-convertor-laravel/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/likeadeckofcards/enum-convertor-laravel/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
66
[![Total Downloads](https://img.shields.io/packagist/dt/likeadeckofcards/enum-convertor-laravel.svg?style=flat-square)](https://packagist.org/packages/likeadeckofcards/enum-convertor-laravel)
77

8-
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
8+
This package adds a command that will take PHP enums and turn them into TS/JS enums for use in frontend development.
99

1010
## Support us
1111

@@ -23,13 +23,6 @@ You can install the package via composer:
2323
composer require likeadeckofcards/enum-convertor-laravel
2424
```
2525

26-
You can publish and run the migrations with:
27-
28-
```bash
29-
php artisan vendor:publish --tag="enum-convertor-laravel-migrations"
30-
php artisan migrate
31-
```
32-
3326
You can publish the config file with:
3427

3528
```bash
@@ -40,22 +33,21 @@ This is the contents of the published config file:
4033

4134
```php
4235
return [
36+
/*
37+
* relative paths from the project root
38+
*/
39+
'enum_paths' => [
40+
'app/Enums' => 'resources/js/types/enums',
41+
// 'input/folder' => 'output/folder'
42+
],
43+
44+
/*
45+
* extension to use for the enum files
46+
*/
47+
'enum_extension' => '.d.ts',
4348
];
4449
```
4550

46-
Optionally, you can publish the views using
47-
48-
```bash
49-
php artisan vendor:publish --tag="enum-convertor-laravel-views"
50-
```
51-
52-
## Usage
53-
54-
```php
55-
$enumConvertor = new GearboxSolutions\EnumConvertor();
56-
echo $enumConvertor->echoPhrase('Hello, GearboxSolutions!');
57-
```
58-
5951
## Testing
6052

6153
```bash

config/enum-convertor-laravel.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
<?php
22

3-
// config for GearboxSolutions/EnumConvertor
43
return [
4+
/*
5+
* relative paths from the project root
6+
*/
57
'enum_paths' => [
68
'app/Enums' => 'resources/js/types/enums',
9+
// 'input/folder' => 'output/folder'
710
],
811

12+
/*
13+
* extension to use for the enum files
14+
*/
915
'enum_extension' => '.d.ts',
1016
];

0 commit comments

Comments
 (0)