ark生态系统 / 基础
Laravel 用户界面框架。由 Tailwind CSS 驱动。
Requires
- php: ^8.0
- calebporzio/sushi: ^2.4
- danharrin/livewire-rate-limiting: ^1.1
- driftingly/rector-laravel: ^0.21
- elgigi/commonmark-emoji: ^2.0
- ergebnis/phpstan-rules: ^1.0
- fakerphp/faker: ^1.23
- friendsofphp/php-cs-fixer: ^3.19
- google/recaptcha: ^1.3
- graham-campbell/analyzer: ^3.0
- guzzlehttp/guzzle: ^7.7
- illuminate/bus: ^10.0
- illuminate/contracts: ^10.0
- illuminate/http: ^10.0
- illuminate/mail: ^10.0
- illuminate/support: ^10.0
- illuminate/view: ^10.0
- jamesmills/laravel-timezone: ^1.13
- jasonmccreary/laravel-test-assertions: ^2.3
- jenssegers/agent: ^2.6
- laravel/fortify: ^1.21
- laravel/telescope: ^5.0
- league/commonmark: ^2.4
- livewire/livewire: ^3.0
- mockery/mockery: ^1.6
- nunomaduro/collision: ^7.0
- nunomaduro/larastan: ^2.6
- pestphp/pest: ^2.0
- pestphp/pest-plugin-faker: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- pestphp/pest-plugin-livewire: ^2.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/phpunit: ^10.0
- pragmarx/google2fa-laravel: ^2.1
- rector/rector: ^0.19
- ruafozy/mersenne-twister: ^1.0
- spatie/laravel-flash: ^1.9
- spatie/laravel-honeypot: ^4.3
- spatie/laravel-medialibrary: ^10.10
- spatie/laravel-newsletter: ^5.1
- spatie/laravel-package-tools: ^1.15
- spatie/laravel-personal-data-export: ^4.2
- spatie/laravel-responsecache: ^7.4
- spatie/laravel-schemaless-attributes: ^2.4
- spatie/laravel-sluggable: ^3.5
- spatie/pest-plugin-snapshots: ^2.0
- spatie/regex: ^3.1
- spatie/yaml-front-matter: ^2.0
Requires (Dev)
- orchestra/testbench: ^8.22
- spatie/mailcoach-sdk-php: ^1.4
- dev-main
- 18.0.0
- 17.0.0
- 16.3.0
- 16.2.0
- 16.1.0
- 16.0.0
- 15.0.0
- 14.1.0
- 14.0.0
- 13.35.0
- 13.34.0
- 13.33.0
- 13.32.0
- 13.31.0
- 13.30.0
- 13.29.1
- 13.29.0
- 13.28.0
- 13.27.0
- 13.26.0
- 13.25.0
- 13.24.0
- 13.23.0
- 13.22.0
- 13.21.0
- 13.20.0
- 13.19.0
- 13.18.0
- 13.17.0
- 13.16.1
- 13.16.0
- 13.15.0
- 13.14.0
- 13.13.0
- 13.12.0
- 13.11.0
- 13.10.0
- 13.9.0
- 13.8.0
- 13.7.0
- 13.6.0
- 13.5.1
- 13.5.0
- 13.4.0
- 13.3.0
- 13.2.0
- 13.1.0
- 13.0.0
- 12.19.0
- 12.18.0
- 12.17.0
- 12.16.0
- 12.15.0
- 12.14.0
- 12.13.0
- 12.12.0
- 12.11.0
- 12.10.0
- 12.9.1
- 12.9.0
- 12.8.0
- 12.7.1
- 12.7.0
- 12.6.0
- 12.5.0
- 12.4.0
- 12.3.0
- 12.2.0
- 12.1.0
- 12.0.0
- 11.9.1
- 11.9.0
- 11.8.0
- 11.7.0
- 11.6.0
- 11.5.0
- 11.4.0
- 11.3.0
- 11.2.1
- 11.2.0
- 11.1.0
- 11.0.3
- 11.0.2
- 11.0.1
- 11.0.0
- 10.18.2
- 10.18.1
- 10.18.0
- 10.17.0
- 10.16.0
- 10.15.0
- 10.14.0
- 10.13.0
- 10.12.1
- 10.12.0
- 10.11.0
- 10.10.0
- 10.9.0
- 10.8.1
- 10.8.0
- 10.7.0
- 10.6.0
- 10.5.0
- 10.4.0
- 10.3.0
- 10.2.0
- 10.1.3
- 10.1.2
- 10.1.1
- 10.1.0
- 10.0.0
- 9.2.0
- 9.1.1
- 9.1.0
- 9.0.1
- 9.0.0
- 8.1.1
- 8.1.0
- 8.0.2
- 8.0.1
- 8.0.0
- 7.0.0
- 6.8.1
- 6.8.0
- 6.7.0
- 6.6.4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
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-refactor/remove-fortify--nova-integration
- dev-chore/update-laravel
- dev-refactor/handle-overriding-currency-decimal-places
- dev-chore/update-php-packages
- dev-refactor/allow-external-link-icon-override
- dev-barbslex
This package is auto-updated.
Last update: 2024-09-27 09:32:46 UTC
README
Laravel 框架的框架。由 Tailwind CSS 和 Livewire 驱动。
先决条件
由于此包依赖于一些第三方包,您需要安装并配置以下内容到您的项目中
安装
使用 composer 需要: composer require arkecosystem/foundation
用法
示例
Composer 脚本
将以下脚本添加到 composer.json
"scripts": [ "analyse": [ "vendor/bin/phpstan analyse --configuration=vendor/arkecosystem/foundation/phpstan.neon --memory-limit=2G" ], "format": [ "vendor/bin/php-cs-fixer fix --config=vendor/arkecosystem/foundation/.php-cs-fixer.php" ], "refactor": [ "./vendor/bin/rector process --config=vendor/arkecosystem/foundation/rector.php" ], "test": [ "./vendor/bin/pest" ], "test:fast": [ "./vendor/bin/pest --parallel" ], "test:coverage": [ "./vendor/bin/pest --coverage --min=100 --coverage-html=.coverage --coverage-clover=coverage.xml" ] ],
在本地工作于组件
此包包含大量前端组件,但没有自己的前端视图。因此,当您需要在此上工作时,您需要依赖于来自其他项目的客户端。通常,这可以通过在 composer 中创建此包的符号链接来实现,但在这种情况下还需要进行第二个步骤,以确保您可以运行 yarn watch
、yarn prod
等。
我将详细说明,并以 marketsquare.io 项目为例。假设 marketsquare.io 和 laravel-foundation git 仓库都安装在我们的本地开发机的 /Users/my-user/projects/
文件夹中。
步骤 1 - Composer 符号链接
在 marketsquare.io 下的 composer.json
文件中,“repositories” 部分,添加 laravel-foundation 作为路径
"repositories": [ { "type": "path", "url": "../laravel-foundation" } ]
之后运行 composer require arkecosystem/foundation --ignore-platform-reqs -W
。现在 laravel-foundation 包已被符号链接,您可以在 laravel-foundation
仓库中通过 IDE 进行工作。
步骤 2 - 符号链接 node_modules
如果您从 marketsquare.io 仓库运行 yarn watch
,您将遇到许多错误,因为依赖项还不够智能,无法知道它们位于符号链接的目录中。
- 删除
laravel-foundation
上的node_modules
目录。 - 通过运行
ln -s /Users/my-user/projects/marketsquare.io/node_modules node_modules
(在laravel-foundation
仓库中执行)将 marketsquare.io 上的node_modules
目录符号链接到 laravel-foundation。
现在,当您返回到 marketsquare.io 仓库时,您可以运行 yarn watch
。
完成工作后,别忘了删除符号链接。
将这些步骤转换为脚本
请注意:
这些脚本是为 Mac 用户编写的。如果您使用其他操作系统,可能需要相应地进行调整。
unlink:foundation
使用git
命令恢复当前项目。
为了提高您的开发流程,您可以将其转换为脚本,并在命令行中直接使用它们,例如
$ link:foundation $ unlink:foundation
您可以将它们复制粘贴到 .bashrc
、.aliases
或您设置的任何其他用于管理别名的文件中。
在深入研究代码之前,让我解释一下您可以使用它们做什么(跳到代码)。
对于这些示例,我们使用 marketsquare.io
和 laravel-foundation
仓库,假设它们都安装在我们的本地开发机的同一文件夹(/Users/my-user/projects
)中。
将当前项目符号链接到 laravel-foundation
# move into marketsquare.io folder $ cd /Users/my-user/projects/marketsquare.io # symlink to laravel-foundation repo $ link:foundation
就是这样!
该脚本会自动尝试猜测 laravel-foundation
仓库的位置,并将当前项目符号链接到它(在这种情况下为 marketsquare.io
)。
如果当前项目和 laravel-foundation
仓库不在同一文件夹中,脚本会尝试回到上一级目录(../../
)并再次尝试。如果找不到 laravel-foundation
,脚本将退出并输出错误信息。
您始终可以通过传递参数来指定一个自定义路径。
$ link:foundation 'Users/john/repos/laravel-foundation'
从您的当前项目中删除符号链接
# move into marketsquare.io folder $ cd /Users/my-user/projects/marketsquare.io # remove symlink $ unlink:foundation
再次强调,就是这样!
脚本会查找由 link:foundation
创建的 .symlink_foundation
临时文件,其中包含符号链接的路径。如果未找到,它将尝试猜测 laravel-foundation
仓库的位置,并从当前项目(在这种情况下是 marketsquare.io
)中删除符号链接。
如果当前项目和 laravel-foundation
仓库不在同一文件夹中,脚本会尝试回到上一级目录(../../
)并再次尝试。如果找不到 laravel-foundation
,脚本将退出并输出错误信息。
您始终可以通过传递参数来指定一个自定义路径。
$ unlink:foundation 'Users/john/repos/laravel-foundation'
代码
脚本本身就很直观,并且每行都有注释哦。
function link:foundation() { # Check if already symlinked [ -f .symlink_foundation ] && { echo "already symlinked"; return; } # Get path from args or guess it if [ "$1" != "" ]; then FOUNDATION="$1" elif [ -d ../laravel-foundation ]; then FOUNDATION="../laravel-foundation" elif [ -d ../../laravel-foundation ]; then FOUNDATION="../../laravel-foundation" else echo "Unable to find `laravel-foundation`" return fi # Generate random string RANDOM_STRING=$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null) # Set Composer repo composer config repositories.${RANDOM_STRING} '{"type": "path", "url": "'${FOUNDATION}'"}' # Require arkecosystem/foundation composer require arkecosystem/foundation --ignore-platform-reqs -W # Remove node_modules folder rm -rf ${FOUNDATION}/node_modules # Symlink to arkecosystem/foundation node_modules folder ln -s $(pwd)/node_modules ${FOUNDATION}/node_modules # Create .symlink_foundation temp file echo ${FOUNDATION} >> .symlink_foundation # Inform user that all went ok echo "${FOUNDATION} has been symlinked" } function unlink:foundation() { # Get path from .symlink_foundation file or from args or guess it if [ -f .symlink_foundation ]; then FOUNDATION=$(cat .symlink_foundation) elif [ "$1" != "" ]; then FOUNDATION="$1" elif [ -d ../laravel-foundation ]; then FOUNDATION="../laravel-foundation" elif [ -d ../../laravel-foundation ]; then FOUNDATION="../../laravel-foundation" else echo "Unable to find `laravel-foundation`" return fi # Remove symlink unlink ${FOUNDATION}/node_modules # Remove temp file rm -rf .symlink_foundation # Clean up repo git reset --hard git clean -df # Inform user that all went ok echo "${FOUNDATION} symlink has been removed" }