concretecms/composer 问题修复 & 功能扩展

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

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

concretecms/composer

Composer 安装命令:

composer create-project concretecms/composer

包简介

A fully featured skeleton for a composer managed Concrete site

README 文档

README

Latest Version on Packagist Software License Build Status Total Downloads

Creating a new project

First choose a name for your project. In this example, our project is called "the_oregon_trail"

$ composer create-project -n concretecms/composer the_oregon_trail

Now you have the latest version of Concrete and you're ready to install!

Note: This is a skeleton project. So once you create a project, you can install your own VCS and change the README and all that.

Starting with the Concrete latest develop

First create a new project

$ composer create-project -n concretecms/composer the_oregon_trail

Then navigate into that project and require the dev-develop version of concretecms/core

$ cd the_oregon_trail
$ composer require concretecms/core:dev-develop

Installing Concrete

Navigate into your new Concrete project

$ cd the_oregon_trail

and use the interactive install commmand that comes with Concrete's CLI tool

$ ./vendor/bin/concrete c5:install -i

Follow directions and your site will begin installing!

Note: You can also run the CLI tool directly with PHP

$ ./public/concrete/bin/concrete

Install a Concrete package using composer

Find the package you'd like to install on packagist.org (in this case concretecms/sample_composer_package)

Note: You can also use composer's repository functionality to manage private packages using composer

$ composer require concretecms/sample_composer_package
$ ./vendor/bin/concrete c5:package-install sample_composer_package

Compiling JS / CSS assets

This library uses Laravel Mix. See webpack.mix.js. To build assets:

npm install
npm run dev   # Build for development
npm run hot   # Build with hot reloading enabled (See hot reloading section)
npm run watch # Build with a watcher that rebuilds when files change
npm run prod  # Build for production

Hot Module Replacement

Hot module replacement (hot reloading) allows you to write code and instantly see the changes in your browser, without reloading the page. In order to use hot reloading with Concrete, you'll want to use the mix and mixAsset helper functions to wrap your js and css urls. These functions make it so that your assets automatically detect hot reloading mode and output the appropriate urls, they are safe to use in production:

In a page theme:

<?php
use function Concrete5\Composer\mixAsset;
...

class PageTheme extends Theme
{
  public function registerAssets()
  {
    $this->requireAsset(mixAsset('/path/to/file.js'));
  }
}
<?php
use function Concrete5\Composer\mixAsset;
...

class Controller extends BlockController
{
    public function registerViewAssets()
    {
        $this->requireAsset(mixAsset('/path/to/js/file.js'));
        $this->requireAsset(mixAsset('/path/to/css/file.css'));
    }
}

or in a theme template:

<?php
use function Concrete5\Composer\mix;
?>

<script src='<?= mix('/path/to/your/asset.js') ?>'></script>
<link href='<?= mix('/path/to/your/asset.css') ?>' />

Free marketplace addons

Do you want to install an add-on that is free in the Concrete marketplace, but not on packagist.org? Go to https://composer.concretecms.org/.

concretecms/composer 适用场景与选型建议

concretecms/composer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.3k 次下载、GitHub Stars 达 37, 最近一次更新时间为 2022 年 05 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 concretecms/composer 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 37
  • Watchers: 10
  • Forks: 24
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-19