swthate/craft-workbench
Composer 安装命令:
composer create-project swthate/craft-workbench
包简介
Craft CMS + Vue.js + TailwindCSS Boilerplate + Some Personal Opinions
README 文档
README
Fork of the craft-vue template that integrates the Tailwind CSS utility framework & removes unused CSS with Purgecss.
What's Included
-
npm run dev/yarn dev: first-in-class development experience.- Webpack +
vue-loaderfor single file Vue components - State preserving hot-reload
- Page reloading on file edits (twig, html, etc)
- State preserving compilation error overlay
- Lint-on-save with ESLint
- Source maps
- Webpack +
-
npm run build/yarn build: Production ready build.- JavaScript minification with UglifyJS v3
- Babel compiling
- CSS across all components extracted into a single file and minified with cssnano
- Static assets compiled with version hashes for efficient long-term caching
- Removes unused CSS with Purgecss. Includes whitelister to keep third-party libraries untouched.
- Bundle size analytics
Fork It And Make Your Own
You should fork this repo to create your own opinionated boilerplate for your setup. This template makes no assumptions about pre-processors, template structure, or linting configurations.
Setup
This boilerplate requires Vue CLI 3 be installed globally on your machine.
# create & install project composer create-project chasegiunta/craft-vue-tailwind PATH # run Craft's setup & install ./craft setup # install the Twigpack plugin ./craft install/plugin twigpack # install dependencies npm install # yarn # (optional) initialize Tailwind's config file (tailwind.config.js) ./node_modules/.bin/tailwind init # run dev server (default runs on localhost:8080) npm run dev # yarn dev (alias for 'yarn serve') # build for production with minification npm run build # yarn build
Once up and running, the fun part comes in using Vue CLI's GUI to customize your project to suite your needs. Simply run vue ui and import your newly created project to get started.
You can also run your dev & build tasks from the GUI to get valuable build stats & runtime analytics.
NOTE: During development, only your assets will be served from localhost:8080 and referenced in the base template. You'll still load your site locally under your normal development domain (mysite.test, etc.). This will also cause a brief unstyled flash on page loads due to JS/CSS assets loading from javascript for development. This flash isn't present after build, on production.
If webpack's dev server (yarn dev) is not running, Twigpack will serve your assets from the build directory.
For a detailed explanation on how things work, check out the Twigpack docs & Vue CLI docs.
Pre-Processors
This boilerplate has pre-configured CSS extraction for most popular CSS pre-processors including LESS, SASS, Stylus, and PostCSS. To use a pre-processor, all you need to do is install the appropriate webpack loader for it. For example, to use SASS:
npm install sass-loader node-sass --save-dev
# yarn add sass-loader node-sass --dev
Note you also need to install node-sass because sass-loader depends on it as a peer dependency.
Read more about this at https://cli.vuejs.org/guide/css.html#pre-processors
Automatic Component Registration
Any vue components placed within src/components will be registered with Vue automatically. You may nest these in subfolders if you wish.
Babel Compiling
This boilerplate uses babel-preset-env for configuring babel. You can read more about it here.
Linting
You can enable linting by adding the @vue/cli-plugin-eslint plugin through the GUI vue ui.
swthate/craft-workbench 适用场景与选型建议
swthate/craft-workbench 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 06 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cms」 「project」 「Craft」 「craftcms」 「vue」 「Vue.js」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 swthate/craft-workbench 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 swthate/craft-workbench 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 swthate/craft-workbench 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Expand, collapse, change the status of, or delete multiple blocks in a Matrix field simultaneously.
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
Integrate with Snipcart.
Task system for APPUI
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unlicense
- 更新时间: 2019-06-10