Giter Club home page Giter Club logo

laravel-vue-generators's Introduction

Laravel Vue Generators

Latest Stable Version License Build Status Quality Score StyleCI Total Downloads

Generate Vue js file stubs via artisan commands.

Contents

Upgrade Information

Version 0.1.* to Version 0.2.0

Version 0.2.0 adds Laravel 5.4 support. For Laravel 5.3, please use Version 0.1.4:

composer require zachleigh/laravel-vue-generators:0.1.*

Install

Install via composer:

composer require zachleigh/laravel-vue-generators

In Laravel's config/app.php file, add the service provider to the array with the 'providers' key.

VueGenerators\ServiceProvider::class

Publish the config file:

php artisan vendor:publish --provider="VueGenerators\ServiceProvider"

Usage

This package currently contains two commands: component and mixin.

component

Create a Vue js component file.

php artisan vueg:component {name} {--empty} {--path=}
name

Name of the component.

php artisan vueg:component MyComponent

Will create a file called MyComponent.vue at resources/assets/js/components/MyComponent.vue.

empty

By default, the component will be filled with all available component methods (data, props, computed etc.). Use empty flag to create an empty component with no methods.

php artisan vueg:component MyComponent --empty

Will create a file with no component methods.

path

By default, all components will be saved in resources/assets/js/components/. Specify a custom path with the path flag. Path root is in resources/.

php artisan vueg:component MyComponent --path=assets/js/custom/folder

Will create a file called MyComponent.vue at resources/assets/js/custom/folder/MyComponent.vue.

mixin

Create a Vue js mixin file.

php artisan vueg:mixin {name} {--empty} {--path=}
name

Name of the mixin.

php artisan vueg:mixin MyMixin

Will create a file called MyMixin.vue at resources/assets/js/mixins/MyMixin.vue.

empty

By default, the mixin will be filled with all available mixin methods (data, props, computed etc.). Use empty flag to create an empty mixin with no methods.

php artisan vueg:mixin MyMixin --empty

Will create a file with no mixin methods.

path

By default, all mixins will be saved in resources/assets/js/mixins/. Specify a custom path with the path flag. Path root is in resources/.

php artisan vueg:mixin MyMixin --path=assets/js/custom/folder

Will create a file called MyMixin.vue at resources/assets/js/custom/folder/MyMixin.vue.

Configuration

Set default paths for components and mixins. All paths are relative to Laravel's resources directory.

'paths' => [
    'components' => 'path/to/components',
    'mixins'     => 'path/to/mixins',
]

Testing

composer test

Contributing

Contributions are more than welcome. Fork, improve and make a pull request. For bugs, ideas for improvement or other, please create an issue.

laravel-vue-generators's People

Contributors

zachleigh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-vue-generators's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.