uptime-it/nova-assets-changer
最新稳定版本:1.2.2
Composer 安装命令:
composer require uptime-it/nova-assets-changer
包简介
Change Nova resources
README 文档
README
This package is for Nova 4 and swaps the resources from the resources/Nova/Nova folder with those in
the vendor/laravel/nova/resources/js folder or use the php artisan custom-assets:publish
command.
Then the assets are recompiled and published with the Force option.
This package creates a backup of each file and checks for changes
Attention. The original vendor files will be overwritten.
IMPORTANT
You must run the php artisan nova:custom-assets after every composer update!
Tip: You can replace @php artisan nova:publish with @php artisan custom-assets:after-composer-update in
Your composer.json
Install
composer require norman-huth/nova-assets-changer --dev
Running
For the full process run this command:
php artisan nova:custom-assets
Optional
Run Command Only If A Nova Update Is Detected (Or The Package Has No Version Saved)
php artisan custom-assets:after-composer-update
Publish Nova Assets Via Command
php artisan custom-assets:publish
Publish Nova Field Assets Via Command (experimental)
php artisan custom-assets:publish:field
Notice
After a Nova update, you need to check your resource files to see if they are still compatible.
Examples
I make not a release for every example. For all example resources take a look in the resources folder of the GitHub
repository.
⚠️ These files are all based on one of the first Nova 4 releases and serve only as an example! ⚠️
Other Composer Or NPM Command
Create a command:
php artisan make:command CustomAssetsCommand
with followingen content:
<?php namespace App\Console\Commands; use NormanHuth\NovaAssetsChanger\Console\Commands\CustomAssetsCommand as Command; class CustomAssetsCommand extends Command { /** * CLI Composer Command * * @var string */ protected string $composerCommand = 'composer'; /** * CLI NPM Command * * @var string */ protected string $npmCommand = 'npm'; }
Add Custom CSS
Create resources/Nova/custom.css with Your custom CSS.
Register new pages
Example: Register Page
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-16