roy-veldman/wirecraft 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

roy-veldman/wirecraft

Composer 安装命令:

composer require roy-veldman/wirecraft

包简介

Boilerplate for Craft CMS project, which include webpack and a basic structure

README 文档

README

Build instructions

  1. composer create-project roy-veldman/wirecraft [projectname]
  2. cd into the project
  3. create database
    • mysql -u [username] (add -p if you have a password)
    • create database [database-name];
  4. run ./craft setup/index
  5. run composer update
  6. run npm install
  7. run npm run dev
  8. Login to the back-end
    • Setup the homepage
    • Go to settings -> plugins, and install the plugins
    • Create Assets in the uploads folder @web/assets/uploads/{images}
  • Created an uploads folder for all the images and files you set-up in craft, this folder does not get pushed so you won't have any conflicts with local and production. The static images that are hardcoded or static icons are in the actual image or icons folder, these can be pushed.

Production build

run npm run build if you are ready for production, this will minify the javascript and css files.

Starting instructions

If you created a homepage on the back-end of craft, whether is a single page or a structure you can start with the code below.

  • Example of the filename pages/_entry.twig
{% extends 'layouts/_master' %}

{% block content %}

      {# content comes here #} 

{% endblock %}

Additional information

VueJS

  • VueJs is already standard in the boilerplate, if you want to make use of it, follow the following steps:
  • Inside app.js
import Vue from 'vue'

new Vue({
    el: [targetElement]
});
  • Inside JS folder
    • create components folder
    • create .vue files
  • In the .vue files you can also access the global variables from your scss files, if you want to add or change this go into webpack.common.js and configure the configureCssLoader()

Jquery

  • If you want to use Jquery on your project (which i don't recommend), follow the steps below
  • All these changes are in the webpack.common.js
// At the top of the file add the webpack variable
const webpack = require('webpack'); 

// Inside the plugins add the following plugin, 
// Add this below the CopyWebpackPlugin
new webpack.ProvidePlugin({
    $: 'jquery',
    jQuery: 'jquery'
})

Boilerplate information

  • Craft CMS (clean install)
  • Basic folder structure
    • Src folder with JS and SCSS
    • Starting files ( app.scss / app.js )
    • Standard mobile mixin ( already includes in app.scss )
    • Layout folder with _master.twig file, which contains basic layout file ( css and js includes aswell as seo plugin )
  • Craft Module
    • Cache busting (gives the css and js files a version number)
  • Craft Plugins
    • Entry instructions
    • Super table
    • SEO
    • Redactor
  • Webpack (for compiling css and js)
    • ES6 functionality
    • SCSS
    • VueJS
    • File-loader
    • Babel
    • Copying static assets ( standard fonts and icons )
    • Minify CSS and JS on production ( prefix included! )
    • Live server with hot reload
    • Clean files plugin ( removes unused css and js files from assets folder )

By Roy Veldman

roy-veldman/wirecraft 适用场景与选型建议

roy-veldman/wirecraft 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 74 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 roy-veldman/wirecraft 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-17