sc-laravel-presets/default-tailwindcss
Composer 安装命令:
composer require sc-laravel-presets/default-tailwindcss
包简介
Laravel frontend preset for default setup and Tailwind CSS
关键字:
README 文档
README
A Laravel front-end scaffolding preset for Tailwind CSS - a Utility-First CSS Framework for Rapid UI Development.
Current version: Tailwind CSS 1.1.2
What it does
- Upgrades laravel-mix to 4.1.2
- Installs postcss-import 12.0.1
- Installs postcss-nesting 7.0.1
- Installs tailwindcss 1.1.2
- Installs @tailwindcss/custom-forms 0.2.1
- Installs vue 2.6.10
- Installs vue-template-compiler 2.6.10
- Removes jquery & bootstrap & sass
- Adds an in memory sqlite database connection for phpunit in the
phpunit.xmlfile. - Configures Webpack to use PostCss and not sass, since Tailwind is a PostCss plugin. With the
postcss-nestingplugin installed, you are able to write nested css that looks very much like sass, but is using standard css files. - Adds
primary,secondary,success,warning,danger&errorcolors along with a default font to the tailwind.config.js file. These colors are currently set to blue, gray, green, orange, red & red respectively. They can then be used to assign primary and secondary colors to backgrounds, text, borders, etc. and contain the same shading as the rest of the colors. e.g.text-primary-500,bg-secondary-300,text-error-600 - Adds a
core,button,dropdown,loaderandnavpartial with basic styling in the css/components directory. - Uses custom form classes from the tailwindcss/custom-forms package.
- Updates all relevant views to use the Tailwind classes instead of Bootstrap.
-authpreset will add the HomeController along with all relevant views and routes.
Usage
-
Fresh install Laravel >= 6 and
cdto your app. -
Install this preset: Laravel will automatically discover this package. No need to register the service provider.
composer require sc-laravel-presets/default-tailwindcss
-
Run the preset installer:
Command to install only the base preset without any of the authorization scafolding.
php artisan preset default-tailwind
Command to install the full preset with the authorization scafolding (auth route entry, Tailwind CSS auth views).
php artisan preset default-tailwind-auth
NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in
routes/web.php -
Install all the node dependencies and compile all the assets:
npm install && npm run dev -
Configure your favorite database (mysql, sqlite etc.). See the Laravel documentation for more details.
-
Migrate your database, if needed:
php artisan migrate
-
Start your local web server by running either of the following commands:
Command to start up Laravel Valet
valet start
Or use if you are not using Valet
php artisan serve
-
View your site in the browser to test the new preset.
Config
The default tailwind.config.js configuration file included by this package uses custom color names. Should you wish to make changes, you can easily do so by modifying this file. See the Tailwind documentation for more detail.
The tailwindcss/custom-forms customization is also in the tailwind.config.js file under the customForms key. See their documentation if you want to change any of the form styling.
sc-laravel-presets/default-tailwindcss 适用场景与选型建议
sc-laravel-presets/default-tailwindcss 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 109 次下载、GitHub Stars 达 2, 最近一次更新时间为 2019 年 01 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「preset」 「tailwindcss」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sc-laravel-presets/default-tailwindcss 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sc-laravel-presets/default-tailwindcss 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sc-laravel-presets/default-tailwindcss 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bulma Frontend Preset For Laravel Framework 6.0 and Up
TitleWithSlugInput - Easy Permalink Slugs for the FilamentPHP Form Builder (PHP / Laravel / Livewire)
TailwindPHP - use Tailwind CSS in your PHP projects (without npm)
DCODE FrontEnd preset for Laravel.
Vanilla Components Integration with Laravel
Image cache
统计信息
- 总下载量: 109
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-25