laminblur/vue-generate is a Laravel package for laravel vue generators.
It currently has 0 GitHub stars and 183 downloads on Packagist (latest version v1.0.7).
Install it with composer require laminblur/vue-generate.
Discover more Laravel packages by laminblur
or browse all Laravel packages to compare alternatives.
Last updated
This Laravel package provides the following two generators to speed up your Vue development process:
make:vue-componentmake:vue-mixincomposer require laminblur/vue-generate
Laravel's Package Discovery automatically discovers this package.
Open config/app.php, and add a new item to the Package Service Providers array.
Laminblur\VueGenerate\VueGenerateServiceProvider::class,
You may want to adjust your Component/Mixin stubs or change the path in which they are generated. To do this you simply need to publish the configuration file.
php artisan vendor:publish
php artisan vendor:publish --provider="Laminblur\VueGenerate\VueGenerateServiceProvider"
This will publish the following configuration file to config/vue-generators.php:
<?php
return [
/*
* Location of the stubs to use
*/
//'component_stub' => __DIR__.'/component.stub',
//'mixin_stub' => __DIR__.'/mixin.stub',
/*
* Location of where to generate the files
*/
'components_path' => '/resources/assets/js/components/',
'mixins_path' => '/resources/assets/js/mixins/'
];
php artisan make:vue-component MyNewComponent
This will generate the following MyNewComponent.vue Vue component in /resources/assets/js/components/:
<template>
</template>
<script>
export default {
// Assets
components: {},
// Composition
mixins: [],
extends: {}
// Data
data() {
return {}
},
props: {},
propsData: {},
computed: {},
methods: {},
watch: {},
// Lifecycle Hooks
beforeCreate() {},
created() {},
beforeMount() {},
mounted() {},
beforeUpdate() {},
updated() {},
activated() {},
deactivated() {},
beforeDestroy() {},
destroyed() {}
}
</script>
<style>
</style>
php artisan make:vue-mixin MyNewMixin
This will generate the following MyNewMixin.js Vue mixin in /resources/assets/js/mixins/:
export default {
// Assets
components: {},
// Composition
mixins: [],
extends: {}
// Data
data() {
return {}
},
props: {},
propsData: {},
computed: {},
methods: {},
watch: {},
// Lifecycle Hooks
beforeCreate() {},
created() {},
beforeMount() {},
mounted() {},
beforeUpdate() {},
updated() {},
activated() {},
deactivated() {},
beforeDestroy() {},
destroyed() {}
}
Want to contribute? Great!
The MIT License (MIT)
Free Software, Hell Yeah!