Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suomato/laravel-vue-component-generator
Generates a new Vue component with boilerplate in Laravel project
https://github.com/suomato/laravel-vue-component-generator
artisan artisan-command generator laravel vue-components
Last synced: about 1 month ago
JSON representation
Generates a new Vue component with boilerplate in Laravel project
- Host: GitHub
- URL: https://github.com/suomato/laravel-vue-component-generator
- Owner: suomato
- License: mit
- Created: 2017-07-24T21:01:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-27T14:43:09.000Z (over 7 years ago)
- Last Synced: 2024-10-17T07:38:06.274Z (3 months ago)
- Topics: artisan, artisan-command, generator, laravel, vue-components
- Language: PHP
- Homepage: https://packagist.org/packages/suomato/laravel-vue-component-generator
- Size: 61.5 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel Vue Component Generator
## Introduction
> If you love to use Artisan and Vue is the frontend framework of your choice, this package is for you! The `laravel-vue-component-generator` package gives you a new Artisan command which lets you generate the Vue component very fast.
## Artisan Command
```
php aritsan make:vue-component {name}
```
> During the command execution you have to choose the template engine `(HTML / pug)` and the CSS Pre-prosessor `(CSS / LESS / Sass / Scss / Stylus)`. The Vue component will be generated to `/resources/assets/js/components/` with boilerplate based on your choice.## Code Example
> ![command](screenshots/command.png)
> `Example.vue` is created to `/resources/assets/js/components/`
> Here is the component boilerplate:
>![command](screenshots/code.png)
## Installation
```
composer require suomato/laravel-vue-component-generator
```
> After that, add the ServiceProvider to the providers array in `config/app.php````
Suomato\VueComponentGenerator\VueComponentGeneratorServiceProvider::class,
```> Enjoy using the new Artisan command.
## Config
> If you don't want to choose the same template engine and CSS Pre-processor over and over again or if you're not happy with the default boilerplate, feel free to edit config or views. To publish the config and views use:
```
php artisan vendor:publish --provider="Suomato\VueComponentGenerator\VueComponentGeneratorServiceProvider"
```- Config is located `/config/vue-component-generator.php`
- Views is located `/resources/views/vendor/laravel-vue-component-generator`