承接 squibler/laravel-preset 相关项目开发

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

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

squibler/laravel-preset

Composer 安装命令:

composer require squibler/laravel-preset

包简介

Set up laravel cleanly

README 文档

README

A configurable preset for Laravel with sensible defaults which:

  • Applies default packages and settings to both packages.json and composer.json
  • Updates .gitignore with default preferences
  • Writes default artefacts into your directory structure
  • Moves models into an app/Models directory
  • Adds commitizen for standardised commit messages

Usage

1. Install to dev using composer

composer require --dev squibler/laravel-preset

2. Update the preset settings (optional)

Now make changes (if any) to the initial packages you want installed using the preset config.

Publish the preset.json to your project root to update the preset settings.

After the initial set up, it's expected you will never use the preset again which is why it gets ignored.

php artisan vendor:publish --provider='Squibler\Preset\Providers\PresetsServiceProvider'

The default preset configuration is designed with an API only applictaion in mind:

{
    "composer": {
        "scripts": {
            "test": "phpunit"
        },
        "require": [
            "bensampo/laravel-enum",
            "laravel/passport",
            "rexlabs/laravel-smokescreen"
        ],
        "requireDev": [
            "phpunit/phpunit",
            "squibler/laravel-artisan",
            "squizlabs/php_codesniffer"
        ]
    },
    "packages": {
        "scripts": {},
        "dependencies": [],
        "devDependencies": [
            "cz-customizable"
        ],
        "configs": {
            "commitizen": {
                "path": "node_modules/cz-customizable"
            }
        }
    },
    "ignore": [
        "_dev", ".vscode"
    ],
    "artefacts": {
        ".cz-config.js": ".cz-config.js"
    }
}

3. Apply your preset

You're now ready to apply your own defaults to Laravel, you can apply the preset using:

php artisan preset squib

4. Clean up

Applying a preset is only something you will do once on a project, so there is a helper command to clean up if you choose to. It's not required as sensible default ignores are added to the .gitignore file. But if you use something like EB deploy then this is something you probably will want to do.

php artisan squib:preset:mop

What does this preset do

I wanted to make a preset that could be configured easily on a per project basis but also had some sensible defaults out of the box

So by default it's set up with a API configuration as most of my Laravel projects are API motivated

  • Removes unneeded Javascript Libraries
  • Updates the .gitignore
  • Removes the assests/sass Directory
  • Removes the assets/js
  • Updates and installs composer packages if any
    • laravel/passport
    • rexlabs/laravel-smokescreen
  • Updates and installs npm packages if any or...
  • Removes node_modules (if no packages)
  • Moves User model to app/Models dir

What's next

My plan is to make this even more configuarable - for example, the javascript libraries are all removed similar to the default Laravel php artisan preset none command but I would prefer if they could be chosen on a per project basis.

I am also contemplating creating a presets repo, where people can keep their own set of defaults and then possibly something like:

php artisan squib:preset:keep namespace/name # To store the preset.json options
php artisan squib:preset:use namespace/name # to fetch the preset.json file

squibler/laravel-preset 适用场景与选型建议

squibler/laravel-preset 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 26 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 09 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 squibler/laravel-preset 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-22