承接 tightenco/lambo 相关项目开发

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

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

tightenco/lambo

最新稳定版本:v3.1.1

Composer 安装命令:

composer create-project tightenco/lambo

包简介

Super-powered 'laravel new' with Laravel and Valet.

README 文档

README

Lambo logo

Run tests

Super-powered laravel new for Laravel and Valet

Lambo is a command-line tool that replaces the Laravel installer and wraps up the most common tasks you might take when creating a Laravel app: opening it in your editor and your browser, initialize a git repository, tweak your .env and .env.example, and more.

Requirements

Installation

composer global require tightenco/lambo:^3.0

Upgrading

composer global update tightenco/lambo

Usage

Make sure ~/.composer/vendor/bin is in your terminal's path.

cd ~/Sites
lambo new myNextProject

What exactly does it do?

  • laravel new $PROJECTNAME
  • Initialize a git repo, add all the files, and, after some changes below, make a commit with the text "Initial commit."
  • Replace the .env (and .env.example) database credentials with the default macOS MySQL credentials: database of $PROJECTNAME, user root, and empty password
  • Replace the .env (and .env.example) APP_URL with $PROJECTNAME.$YOURVALETTLD
  • Generate an app key
  • Open the project in your favorite editor
  • Open $PROJECTNAME.$YOURVALETTLD in your browser

Note: If your $PROJECTNAME has dashes (-) in it, they will be replaced with underscores (_) in the database name.

There are also a few optional behaviors based on the parameters you pass (or define in your config file), including creating a database, migrating, installing Jetstream, running Valet Link and/or Secure, and running a custom bash script of your definition after the fact.

Customizing Lambo

While the default actions Lambo provides are great, most users will want to customize at least a few of the steps. Thankfully, Lambo is built to be customized!

There are three ways to customize your usage of Lambo: command-line arguments, a config file, and an "after" file.

Most users will want to set their preferred configuration options once and then never think about it again. That's best solved by creating a config file.

But if you find yourself needing to change the way you interact with Lambo on a project-by-project basis, you may also want to use the command-line parameters to customize Lambo when you're using it.

Creating a config file

You can create a config file at ~/.lambo/config rather than pass the same arguments each time you create a new project.

The following command creates the file, if it doesn't exist, and edits it:

lambo edit-config

The config file contains the configuration parameters you can customize, and will be read on every usage of Lambo.

Creating an "after" file

You can also create an after file at ~/.lambo/after to run additional commands after you create a new project.

The following command creates the file, if it doesn't exist, and edits it:

lambo edit-after

The after file is interpreted as a bash script, so you can include any commands here, such as installing additional composer dependencies...

# Install additional composer dependencies as you would from the command line.
echo "Installing Composer Dependencies"
composer require tightenco/mailthief tightenco/quicksand

...or copying additional files to your new project.

# To copy standard files to new lambo project place them in ~/.lambo/includes directory.
echo "Copying Include Files"
cp -R ~/.lambo/includes/ $PROJECTPATH

You also have access to variables from your config file such as $PROJECTPATH and $CODEEDITOR.

Using command-line parameters

Any command-line parameters passed in will override Lambo's defaults and your config settings. See a full list of the parameters you can pass in.

Lambo Commands

  • help or help-screen show the help screen

  • edit-config edits your config file (and creates one if it doesn't exist)

    lambo edit-config
  • edit-after edits your "after" file (and creates one if it doesn't exist)

    lambo edit-after

Configurable parameters

You can optionally pass one or more of these parameters every time you use Lambo. If you find yourself wanting to configure any of these settings every time you run Lambo, that's a perfect use for the config files.

  • -e or --editor to define your editor command. Whatever is passed here will be run as $EDITOR . after creating the project.

    # runs "subl ." in the project directory after creating the project
    lambo new superApplication --editor=subl
  • -p or --path to specify where to install the application.

    lambo new superApplication --path=~/Sites
  • -m or --message to set the first Git commit message.

    lambo new superApplication --message="This lambo runs fast!"
  • -f or --force to force install even if the directory already exists

    # Creates a new Laravel application after deleting ~/Sites/superApplication  
    lambo new superApplication --force
  • -d or --dev to choose the develop branch instead of master, getting the beta install.

    lambo new superApplication --dev
  • -b or --browser to define which browser you want to open the project in.

    lambo new superApplication --browser="/Applications/Google Chrome Canary.app"
  • -l or --link to create a Valet link to the project directory.

    lambo new superApplication --link
  • -s or --secure to secure the Valet site using https.

    lambo new superApplication --secure
  • --create-db to create a new MySQL database which has the same name as your project. This requires mysql command to be available on your system.

    lambo new superApplication --create-db
  • --migrate-db to migrate your database.

    lambo new superApplication --migrate-db
  • --dbuser to specify the database username.

    lambo new superApplication --dbuser=USER
  • --dbpassword specify the database password.

    lambo new superApplication --dbpassword=SECRET
  • --dbhost specify the database host.

    lambo new superApplication --dbhost=127.0.0.1
  • --breeze=STACK to use the Laravel Breeze starter kit. STACK may be either blade, vue or react.

    lambo new superApplication --breeze=blade
    lambo new superApplication --breeze=vue
    lambo new superApplication --breeze=react
  • --jetstream=STACK[,teams] to use the Laravel Jetstream starter kit. STACK may be either inertia or livewire.

    lambo new superApplication --jetstream=inertia
    lambo new superApplication --jetstream=inertia,teams
    lambo new superApplication --jetstream=livewire
    lambo new superApplication --jetstream=livewire,teams
  • --full to use --create-db, --migrate-db, --link, and -secure.

    lambo new superApplication --full
    

GitHub Repository Creation

Important: To create new repositories Lambo requires one of the following tools to be installed:

Lambo will give you the option to continue without GitHub repository creation if neither tool is installed.

  • -g or --github to Initialize a new private GitHub repository and push your new project to it.
# Repository created at https://github.com/<your_github_username>/superApplication
lambo new superApplication --github
  • Use --gh-public with --github to make the new GitHub repository public.
lambo new superApplication --github --gh-public
  • Use --gh-description with --github to initialize the new GitHub repository with a description.
lambo new superApplication --github --gh-description='My super application'
  • Use --gh-homepage with --github to initialize the new GitHub repository with a homepage url.
lambo new superApplication --github --gh-homepage=https://example.com
  • Use --gh-org with --github to initialize the new GitHub repository with a specified organization.
# Repository created at https://github.com/acme/superApplication
lambo new superApplication --github --gh-org=acme

For contributors:

Process for release

If you're working with us and are assigned to push a release, here's the easiest process:

  1. Visit the Lambo Releases page; figure out what your next tag will be (increase the third number if it's a patch or fix; increase the second number if it's adding features)

  2. On your local machine, pull down the latest version of main (git checkout main && git pull)

  3. Build for the version you're targeting (./lambo app:build)

  4. Run the build once to make sure it works (./builds/lambo)

  5. Commit your build and push it up

  6. Draft a new release with both the tag version and release title of your tag (e.g. v1.5.1)

  7. Set the body to be a bullet-point list with simple descriptions for each of the PRs merged, as well as the PR link in parentheses at the end. For example:

    - Add a superpower (#92)

  8. Hit Publish release

  9. Profit

Notes for future development

  • All new configuration keys must be added to the $newConfiguration property in UpgradeSavedConfiguration
  • All removed or deprecated configuration keys must be added to the $removedConfigurationKeys property in UpgradeSavedConfiguration
  • Any time configuration keys are changed, the $configurationVersion property in UpgradeSavedConfiguration needs to be incremented

tightenco/lambo 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 613
  • Watchers: 19
  • Forks: 50
  • 开发语言: PHP

其他信息

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