承接 frischkraft/craft3-webpack5-tailwind2 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

frischkraft/craft3-webpack5-tailwind2

Composer 安装命令:

composer require frischkraft/craft3-webpack5-tailwind2

包简介

Craft CMS 3 Boilerplate with TailwindCSS 2 and Webpack 5

README 文档

README

(with Webpack 5, Tailwind 2, PostCSS 8, and HMR, and other goodies)

A real-world boilerplate for Craft CMS 3 projects that leverages Wepback 5, Tailwind 2, PostCSS 8, and Twigpack. Also included is a hot-reload dev environment. I created this as a starting point for Craft CMS 3 / Webpack 5 projects.

This project was originally created by https://github.com/mizziness/craft3-webpack5-tailwind2-boilerplate

What's Included

  • Craft CMS 3 - My CMS of choice, and the app which will consume assets from Webpack.
  • Webpack 5 - Bundling, optimizing, and serving your assets
  • Twigpack - The bridge between Craft CMS and Webpack
  • TailwindCSS 2 - Awesome CSS framework that makes dev speedy
  • SASS - SASS/SCSS Support
  • PostCSS - Post-processing CSS Files

Other included tools/plugins

Webpack

Transpiling

Loaders, Sass, Plugins

Get Started

First, finish up installing Craft CMS locally for your development environment:

$ composer install
$ ./craft setup

Then install our other packages and run the HMR development server:

$ yarn install
$ yarn dev

(I use yarn for my project, but you don't need to - use the tool of your choice.)

Webpack assets are set up to serve from localhost:8080 by default.

You can include your chunked/hashed assets in Craft CMS templates by using Twigpack's features:

{{ craft.twigpack.includeCssModule("app.css", true) }}
{{ craft.twigpack.includeJsModule("app.js", true, {"type": "module"}) }}
{{ craft.twigpack.includeJsModule("chunk-vendors.js", true) }}

Scripts

As you can see in the package.json file, there are 3 included scripts for convenience:

  • yarn dev - Runs the HMR development server
  • yarn build - Creates a production-ready build for deployment (asset output is in web/dist)
  • yarn clean - A quick way to clear Craft CMS caches while you code

Make it Yours

This project comes pre-configured out of the box to work with Craft CMS templates, but there are plenty of ways you can customize the way this works to suit your own needs. It tries to make no assumptions about your toolkit, other than the minimum required configuration to work with the tools included.

  • Tailwind has been set up with with a default configuration, and I highly suggest modifying it for your project. (You can overwrite it with an existing tailwind.config.js file, if you have one, to import all your custom styling quickly.)
  • devServer options can be changed and extended as needed - for example, by default auto open for the served url is turned off, but if you're using a custom generated template, then you might want it on, instead.
  • Go to town!

Prettier Webpack

If you're like me and you prefer a cleaner webpack report, try this:

yarn add webpackbar -D

In the wpconfig files, you'll see two commented-out lines which you can uncomment to enable a much nicer view of your webpack report with webpackbar.

Inspired By

And used as a starting point: https://github.com/taniarascia/webpack-boilerplate

License

This project is open source and available under the MIT License.

frischkraft/craft3-webpack5-tailwind2 适用场景与选型建议

frischkraft/craft3-webpack5-tailwind2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 03 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cms」 「project」 「Craft」 「craftcms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 frischkraft/craft3-webpack5-tailwind2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 frischkraft/craft3-webpack5-tailwind2 我们能提供哪些服务?
定制开发 / 二次开发

基于 frischkraft/craft3-webpack5-tailwind2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-19