pratyushpundir/laravel-buefy-preset
Composer 安装命令:
composer require pratyushpundir/laravel-buefy-preset
包简介
This preset provides UI components that marry Bulma and VueJS together in the form of Buefy for any new Laravel site / web-app.
关键字:
README 文档
README
Buefy Frontend Preset For Laravel
This preset provides UI components that marry Bulma and VueJS together in the form of Buefy for any new Laravel site / web-app. In Buefy's own words, it provides:
Lightweight UI components for Vue.js based on Bulma.
What it does
- Removes
bootstrapin favor ofbulmaand provides VueJS components to easily use all (and more...) of the Bulma components. - Other NPM packages removed:
lodash,jquery,popper.js. - Adds a Bulma based Blade layout:
resources/views/buefy/layouts/app.blade.php. - Adds a Bulma based Blade view:
resources/views/buefy/welcome.blade.php. - Adds a Bulma based "Navbar" Blade component:
resources/views/buefy/shared/bulma-nav.blade.php. - Adds Vue and Bulma based "Navbar" Blade component:
resources/views/buefy/shared/bulma-nav.blade.php. - Adds Vue and Bulma based "Login" and "Register" forms components:
resources/js/components/shared/LoginForm.vue,resources/js/components/shared/RegisterForm.vue. - Adds versioning / cache-busting of CSS and JS assets for production environments in your
webpack.mix.js.
WARNING!!
The preset provided Blade views are namespaced their own directory, /buefy so nothing should go wrong on that front, but, for a non-fresh project, it will 100% squash any custom JS, SASS, Mix code you may have written). You have been warned!
Getting Started
cdinto your fresh Laravel project.- Run
composer require pratyushpundir/laravel-buefy-preset. - Then run
php artisan preset buefy. This will scaffold everything you need to replace Bootstrap with Bulma and set up your JS, SASS and Blade Views. - Install and compile your assets with
yarn && yarn watchornpm install && npm run watch(butyarnis so much better!!!). - Visit
routes/web.phpand change the following piece of code:
Route::get('/', function () { // Change this... return view('welcome'); });
to
Route::get('/', function () { // ...to this! return view('buefy.welcome'); });
That's it!. Run php artisan serve and visit http://localhost:8000 for a brand new, Bulma+VueJS-based, Welcome page!
Extras
Asset versioning / cache-busting in Production
You need to ensure 2 things happen for this to work:
- SASS and JS assets need to be compiled using the the
productionsettings. To do this, runyarn productionoryarn prod. You can use NPM too of course. But we talked about this! - Your Laravel app needs to be in
productionenvironment. Do this in your.envfile.
Enable the Version Number Badge in bulma-nav.blade.php
- Add
'version' => env('APP_VERSION', '1.0.0'),to yourconfig/app.phpfile. - Add
APP_VERSION=YOUR_VERSION_NUMBERto your.envfile. Replace "YOUR_VERSION_NUMBER" with whatever you need.
Configure the environment indicator
This preset also adds an environment indicator to help you distinguish between various app environments your Laravel app can be in (local, dev, staging, production, etc.). It shows up as a thin colored bar at the very top of the page. The color of the bar indicates the app environment.
This works by adding a class-name equal to a hyphenated form of the environment name you set in your .env file. You can then configure the colors you want your indicator to have in resources/sass/app.scss. Hunt down the following piece of code and change it as needed:
// Configure environment-wise colors you need per environment #env-indicator.local { background-color: $primary; } #env-indicator.dev { background-color: $primary-invert; } // Hide the environment indicator on your choice of environments #env-indicator.production, #env-indicator.staging { display: none !important; }
Author
Pratyush Pundir
Email: pratyushpundir@icloud.com
pratyushpundir/laravel-buefy-preset 适用场景与选型建议
pratyushpundir/laravel-buefy-preset 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 496 次下载、GitHub Stars 达 5, 最近一次更新时间为 2018 年 12 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「vuejs」 「bulma」 「laravel frontend presets」 「buefy」 「laravel vue bulma」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pratyushpundir/laravel-buefy-preset 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pratyushpundir/laravel-buefy-preset 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pratyushpundir/laravel-buefy-preset 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bulma Frontend Preset For Laravel Framework 6.0 and Up
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
Laravel 7+ form wrappers for Bootstrap and bulma.
Asset for Bulma Free for YiiFramework v.3.0.
Code generation for MPMG projects that use Laravel and VueJs tecnologies.
统计信息
- 总下载量: 496
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-21