rrd108/vue-bake
Composer 安装命令:
composer require rrd108/vue-bake
包简介
CakePHP Plugin for Baking Vue Components
README 文档
README
Bake VueJs components from CakePHP 5 models.
For CakePHP 4 version see rrd108/vue-bake/tree/cakephp-4
Are you a full stack developer working with the powerful combination of Vue SPA-s and CakePHP as a REST API backend? If so, we have something special in store for you.
We understand the value of efficient development processes and the convenience that code generation brings. As avid fans of CakePHP's bake automatic code generation capabilities, we noticed a missing piece when it came to template generation. That's why we took it upon ourselves to bridge this gap and create the CakePHP VueBake Plugin.
Our plugin is designed to enhance your development workflow by seamlessly generating VueJs components directly from your CakePHP models. Say goodbye to the tedious task of manually creating Vue components for each model – our plugin automates the process, saving you valuable time and effort.
By leveraging the power of CakePHP's backend as a REST API and combining it with the versatility and interactivity of Vue SPA-s, you'll experience a harmonious synergy that brings your full stack projects to new heights.
Key Features of the CakePHP VueBake Plugin:
-
Automatic VueJs Component Generation: Our plugin effortlessly converts your CakePHP models into VueJs components, complete with the necessary code and structure. No more repetitive manual coding – let the plugin do the heavy lifting for you.
-
Seamless Integration: The plugin seamlessly integrates into your existing CakePHP and Vue SPA project, preserving the integrity of your codebase while enhancing your development capabilities.
-
Customization Options: We understand that each project is unique, and that's why our plugin offers various customization options. Tailor the generated Vue components to match your specific requirements, ensuring a perfect fit for your application.
-
JavaScript and TypeScript Support: Our plugin supports both JavaScript and TypeScript, allowing you to choose the language that best suits your project. The plugin generates Typescript interfaces for your models, making it easy to work with TypeScript.
-
Time and Effort Savings: With the CakePHP VueBake Plugin, you can significantly reduce development time and effort. Spend less time on boilerplate code and more time on building innovative features and delivering value to your users.
As full stack developers ourselves, we created this plugin with a deep understanding of the challenges and demands of working with Vue SPA-s and CakePHP. Our goal is to empower you with a seamless development experience, allowing you to focus on what truly matters – creating exceptional applications.
So why wait? Try out the CakePHP VueBake Plugin today and unlock the full potential of your Vue SPA and CakePHP stack. Elevate your development workflow and experience the convenience of automatic VueJs component generation like never before.
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require --dev rrd108/vue-bake
Then, to load the plugin either run the following command:
bin/cake plugin load VueBake
or manually add the following line to your app's config/plugins.php:
return [
// other plugins
'VueBake' => [],
];
Bake VueJs components
bin/cake bake vue_component ModelName -l ts -p ../../frontend/src/components
-
ModelName: Specify the name of the model for which you want to generate components. For example, if you want to bake components for thePostsmodel, replaceModelNamewithPosts. -
-lor--lang: (Optional) Specify the language for the generated components. By default, it is set tojs(JavaScript). However, you can choosetsfor TypeScript. For instance, use-l tsto generatecomponentsandinterfacesusing TypeScript. -
-por--path: (Optional) Provide the path where the output file should be saved. The path should be relative to thesrcdirectory. Default issrc/VueComponents. For example,-p ../../frontend/src/componentsspecifies that the generated components should be saved in thefrontend/src/componentsdirectory 2 levels above the CakePHP'ssrcdirectory - so it is out of the CakePHP's directory structure.
Note: Make sure to replace the placeholders (ModelName, ../frontend/src/components) with the actual values relevant to your project.
rrd108/vue-bake 适用场景与选型建议
rrd108/vue-bake 是一款 基于 Twig 开发的 Composer 扩展包,目前已累计 720 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 07 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「cakephp」 「vuejs」 「vue」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rrd108/vue-bake 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rrd108/vue-bake 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rrd108/vue-bake 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
A component that allows creating responsive HTML tables or lists from data object
Laravel 5.5+ helper and VueJS 2 component for lab404/laravel-impersonate
Email Toolkit Plugin for CakePHP
Rhino, a CMS and Application-Framework plugin for CakePHP
A CakePHP plugin for sending mail via SparkPost's REST API
统计信息
- 总下载量: 720
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-22