承接 cscart/sdk 相关项目开发

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

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

cscart/sdk

Composer 安装命令:

composer require cscart/sdk

包简介

Command-line tools for CS-Cart & Multi-Vendor developers

README 文档

README

CS-Cart & Multivendor Command Line Tools for Developers Pride.

Purposes

We want to provide convenient developer tools for CS-Cart & Multi-Vendor. This SDK is meant to handle complicated and routine tasks related to add-on and theme development.

Usage

Installing

You'll need Composer installed in your system. Check out its installation guide if you haven't done that before.

When the Composer is installed, just execute this command in your console:

$ composer global require "cscart/sdk:*"

Executing commands

$ cscart-sdk command:name

Command list

addon:symlink

Creates symlinks for add-on files at the CS-Cart installation directory, allowing you to develop and store add-on files in a separate Git repository.

$ cscart-sdk addon:symlink --help
Usage:
  addon:symlink [options] [--] <name> <addon-directory> <cart-directory>

Arguments:
  name                       Add-on ID (name)
  addon-directory            Path to directory with add-on files
  cart-directory             Path to CS-Cart installation directory

Options:
  -r, --relative             Created symlinks will have a relative path to the target file. By default the created symlinks have an absolute path to target.
      --templates-to-design  Whether to take the add-on templates from "var/themes_repository" path at the add-on directory and put them at "design/themes" path in the CS-Cart installation directory . When this option is not specified, the templates are being taken from "var/themes_repository" and also put into "var/themes_repository" directory.
  -h, --help                 Display this help message
  -q, --quiet                Do not output any message
  -V, --version              Display this application version
      --ansi                 Force ANSI output
      --no-ansi              Disable ANSI output
  -n, --no-interaction       Do not ask any interactive question
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
 Creates symlinks for add-on files at the CS-Cart installation directory, allowing you to develop and store add-on files in a separate Git repository.
addon:export

Copies or moves all add-on files to the separate directory, preserving the structure of directories.

$ cscart-sdk addon:export --help
Usage:
  addon:export [options] [--] <name> <addon-directory> <cart-directory>

Arguments:
  name                         Add-on ID (name)
  addon-directory              Path to directory where files should be moved to
  cart-directory               Path to CS-Cart installation directory

Options:
  -d, --delete                 Files and directories will be moved instead of being copied.
      --templates-from-design  Whether to take the add-on templates from "design/themes" path at CS-Cart installation directory and put them at "var/themes_repository" path in the add-on files directory. When this option is not specified, the templates are being taken from "var/themes_repository" and also put into "var/themes_repository" directory.
  -h, --help                   Display this help message
  -q, --quiet                  Do not output any message
  -V, --version                Display this application version
      --ansi                   Force ANSI output
      --no-ansi                Disable ANSI output
  -n, --no-interaction         Do not ask any interactive question
  -v|vv|vvv, --verbose         Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
 Copies or moves all add-on files to the separate directory, preserving the structure of directories.
addon:sync

Synchronizes add-on files between CS-Cart installation directory and the separate directory storing all add-on files. Calling this command has the same effect as calling the "addon:export" and "addon:symlink" commands simultaneously.

$ cscart-sdk addon:sync --help
Usage:
  addon:sync [options] [--] <name> <addon-directory> <cart-directory>

Arguments:
  name                  Add-on ID (name)
  addon-directory       Path to directory where files should be moved to
  cart-directory        Path to CS-Cart installation directory

Options:
  -r, --relative        Created symlinks will have a relative path to the target file. By default the created symlinks have an absolute path to target.
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
 Synchronizes add-on files between CS-Cart installation directory and the separate directory storing all add-on files. Calling this command has the same effect as calling the "addon:export" and "addon:symlink" commands simultaneously.
addon:create

Creates addon directory structure and xml/.po files.

Description:
  Creates addon directory structure and xml/.po files.

Usage:
  addon:create [options] [--] <name> <addon-directory>

Arguments:
  name                                 Add-on ID (name)
  addon-directory                      Path to addon directory.

Options:
  -s, --scheme-version=SCHEME-VERSION  Addon scheme version [default: 3]
  -t, --theme=THEME                    Themes [default: ["responsive"]] (multiple values allowed)
  -l, --locale=LOCALE                  Locale [default: ["en_US","ru_RU"]] (multiple values allowed)
  -h, --help                           Display this help message
  -q, --quiet                          Do not output any message
  -V, --version                        Display this application version
      --ansi                           Force ANSI output
      --no-ansi                        Disable ANSI output
  -n, --no-interaction                 Do not ask any interactive question
  -v|vv|vvv, --verbose                 Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
   * Existing directories and files will be not overwritten.
   * Default templates are located in `cscart-sdk/templates/addon`.
   * User can create own templates in `~/.cscart-sdk/templates/addon`.
addon:build_upgrade

Creates upgrade package between add-on versions

$ php bin/cscart-sdk addon:build_upgrade --help
Usage:
  addon:build_upgrade <old_addon_version_archive_path> <new_addon_version_archive_path> <result_dir_path>

Arguments:
  old_addon_version_archive_path  Old add-on version archive path
  new_addon_version_archive_path  New add-on version archive path
  result_dir_path                 Path to a directory where the built upgrade package will be placed

Options:
  -h, --help                      Display this help message
  -q, --quiet                     Do not output any message
  -V, --version                   Display this application version
      --ansi                      Force ANSI output
      --no-ansi                   Disable ANSI output
  -n, --no-interaction            Do not ask any interactive question
  -v|vv|vvv, --verbose            Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Creates upgrade package between add-on versions
addon:create

Creates addon directory structure and xml/.po files.

$ php bin/cscart-sdk addon:create --help
Description:
  Creates addon directory structure and xml/.po files.

Usage:
  addon:create [options] [--] <name> <addon-directory>

Arguments:
  name                                 Add-on ID (name)
  addon-directory                      Path to addon directory.

Options:
  -s, --scheme-version=SCHEME-VERSION  Addon scheme version [default: 3]
  -t, --theme=THEME                    Themes [default: ["responsive"]] (multiple values allowed)
  -l, --locale=LOCALE                  Locale [default: ["en_US"]] (multiple values allowed)
  -h, --help                           Display this help message
  -q, --quiet                          Do not output any message
  -V, --version                        Display this application version
      --ansi                           Force ANSI output
      --no-ansi                        Disable ANSI output
  -n, --no-interaction                 Do not ask any interactive question
  -v|vv|vvv, --verbose                 Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
   * Existing directories and files will be not overwritten.
   * Default templates are located in `cscart-sdk/templates/addon`.
   * User can create own templates in `~/.cscart-sdk/templates/addon`.

Contributing

To contribute to this project, you need to know how to work with Git and GitHub:

  1. If you haven’t used Git before, check out this tutorial; you can also read Git documentation or find other tutorials on the Internet;
  2. If you want to learn more about GitHub, check out GitHub Help.

You’ll need a GitHub account to submit an issue or a pull request.

Submitting an Issue

Before you submit an issue, please run a search to see that it wasn’t submitted before. That way we’ll be able to deal with issues faster.

If the issue appears to be a bug, and it hasn’t been reported yet, open a new issue: switch to the Issues tab, press the New Issue button and fill in the form. You’ll need to be logged in to your GitHub account.

When submitting an issue, please provide the following information, so that we can fix it quickly:

  • Short summary of the issue - That helps us to keep things organized.

  • Why is it a problem for you? - Not all issues are bugs. If you have a suggestion on how to improve SDK, please tell us how this improvement would benefit the project.

  • Browsers and operating systems - If we know that the issue appears only in specific browsers or only in some operating systems, we’ll be able to reproduce it faster.

  • Steps to reproduce the issue - We need to see the issue for ourselves to confirm and fix it.

  • Suggest a fix - If you know what might be causing the bug, please let us know.

Submitting a Pull Request

GitHub allows you to make a full copy of the SDK and work on it separately. Once you’ve made some changes, you can send us a pull request so that we can include your changes to the main repository.

To contribute to SDK development, do this:

  1. Register an account at GitHub, if you haven’t done it yet—you’ll need the account to complete the following steps.
  2. Fork the SDK — get your own copy of the main SDK repository to work on and experiment with.
  3. Clone your fork to your local machine—a local repository is where all the work is done.
  4. Create a branch in your local clone—having separate branches for different tasks helps to keep things organized.
  5. Work on the SDK in this branch. Please make sure to follow PSR coding standards.
  6. Push your changed branch to your fork in your GitHub account—the changes you made locally will appear in your online repository.
  7. Create a pull request—submit your changes to us.

That’s it! Our specialists will review the changes and may pull them to the repository.

Preparing local development environment

After cloning the forked repository, you'll want to be able to run the cscart-sdk command to test things locally. In order to do that, you'll need to install the Composer package from local path.

Add these lines to your global composer configuration file located at ~/.composer/composer.json path:

{
    "minimum-stability": "dev",
    "repositories": [
        {
            "type": "path",
            "url": "/path/to/cloned/repository/directory"
        }
    ],
    "require": {
        "cscart/sdk": "*"
    }
}

Don't forget to specify path to the correct directory where you cloned your fork of a repo.

After that, execute this command:

$ composer global require cscart/sdk

You need to do this only once; there is no need to re-install the local package every time you make a change in code. Directory with forked repository will be symlinked to your globally installed Composer packages directory.

You're now can test your changes by executing globally available cscart-sdk command.

Copyright and License

Code released under the MIT license.

cscart/sdk 适用场景与选型建议

cscart/sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.16k 次下载、GitHub Stars 达 31, 最近一次更新时间为 2016 年 04 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 31
  • Watchers: 23
  • Forks: 21
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-04