druidfi/tools

此包已被废弃且不再维护。没有建议的替代包。

Druidfi 工具集

安装: 747

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

开放问题: 0

语言:Makefile

0.0.2 2019-02-23 13:33 UTC

This package is auto-updated.

Last update: 2019-05-21 04:30:10 UTC


README

一套旨在简化开发的工具集。

特性

  • 通用的 Make 命令(构建、启动、停止等)
  • 相同命令可以在 Docker 容器和主机上运行
  • 可扩展性
  • 易于更新

如何在项目中使用

下载 oneliner(源文件为 update.sh

$ bash -c "$(curl -fsSL -H 'Cache-Control: no-cache' https://git.io/fh771)"

项目特定

Makefiles:您可以将项目特定的 Make 文件添加到 tools/make/project

以下示例说明如何加载它们:

-include $(PROJECT_DIR)/tools/make/project/*.mk.

默认命令

命令 描述
make build 为开发环境构建
make build ENV=production 为指定环境构建
make debug 显示调试信息
make down 停止环境
make help 列出所有 make 命令
make shell 登录到 CLI 容器
make self-update 自动更新所有来自 druidfi/tools 的工具。请参阅 update.sh
make up 启动环境

在项目根目录下的 Makefile 示例

PHONY :=
PROJECT_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

# Include project env vars (if exists)
-include .env

# Include druidfi/tools config
include $(PROJECT_DIR)/tools/make/Makefile

# Include project specific make files (if they exist)
-include $(PROJECT_DIR)/tools/make/project/*.mk

.PHONY: $(PHONY)

更新工具

通过下载新版本的文件来更新通用工具

$ make self-update

使用位置

常见问题解答

为什么 Makefiles 不能与 Composer 一起包含,也不能从 vendor/druidfi/tools/make 中包含?

因为 make clean 命令会删除 vendor 文件夹。

其他信息

该项目是从 Packagist 找到的: https://packagist.org.cn/packages/druidfi/tools