在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):nascent-africa/jetstrap开源软件地址(OpenSource Url):https://github.com/nascent-africa/jetstrap开源编程语言(OpenSource Language):Vue 48.0%开源软件介绍(OpenSource Introduction):JetstrapDescriptionJetstrap is a lightweight laravel 8 package that focuses on the Table of ContentInstallationInstalling JetstreamYou may use Composer to install Jetstream into your new Laravel project:
If you choose to install Jetstream through Composer, you should run the jetstream:install Artisan command. This command accepts the name of the stack you prefer (livewire or inertia). You are highly encouraged to read through the entire documentation of Livewire or Inertia before beginning your Jetstream project. In addition, you may use the --teams switch to enable team support: Install Jetstream With Livewire
Or, Install Jetstream With Inertia
Install JetstrapUse Composer to install Jetstrap into your new Laravel project as dev dependency:
Regardless how you install Jetstream, Jetstrap commands are very similar to that of Jetstream as it accepts the name of the stack you would like to swap (livewire or inertia).
You are highly encouraged to read through the entire documentation of Jetstream
before beginning your Jetstrap project. In addition, you may use the php artisan jetstrap:swap livewire
or
php artisan jetstrap:swap livewire --teams
php artisan jetstrap:swap inertia --teams This will publish overrides to enable Bootstrap like the good old days! Finalizing The InstallationAfter installing Jetstrap and swapping Jetstream resources, remove tailwindCSS and its dependencies if any from your package.json and then install and build your NPM dependencies and migrate your database:
ExtrasPaginationIt is also important to point out that Laravel 8 still includes pagination views built using Bootstrap CSS. To use these views instead of the default Tailwind views, you may call the paginator's useBootstrap method within your AppServiceProvider: <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Pagination\Paginator;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Paginator::useBootstrap();
}
} PresetsPresets are custom third party templates built using bootstrap. We've thought about it, what are the chances that you're going to use the default template provided by Laravel or Laravel Jetstream. With the assumption you already know which way you want to go before running any type of scaffolding, so if you want to use CoreUi or AdminLte presets then the choice should be specified in your service provider ( And if you change your mind after you've run a swap command and decide to use a preset, then run the Core UiCore Ui lets you save thousands of priceless hours because it offers everything you need to create modern, beautiful, and responsive applications as stated on their website.
To use Core Ui presets, simply call the <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use NascentAfrica\Jetstrap\JetstrapFacade;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
JetstrapFacade::useCoreUi3();
}
} AdminLTEAdminLTE is an open source admin dashboard & control panel theme. Built on top of Bootstrap, AdminLTE provides a range of responsive, reusable, and commonly used components.
To use AdminLte presets, simply call the <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use NascentAfrica\Jetstrap\JetstrapFacade;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
JetstrapFacade::useAdminLte3();
}
} Breeze
According to the documentation, "Breeze provides a minimal and simple starting point for building a Laravel application with authentication.", but personally I'd like to think of it as Laravel Ui without Vue and Bootstrap. Recently I worked on a project that didn't use Vue or require a complex authentication system, so Breeze seemed like a good idea, but again I was faced with the TailwindCSS problem, so I figured why not include it to the Jetstrap package.
Again Jetstrap does not affect the Model / Controller portion of Breeze, just the View. Swapping Breeze resourcesTo swap tailwind resource for bootstrap in a breeze configured laravel, simply run: php artisan jetstrap:swap breeze Swapping Breeze inertia resourcesLaravel Breeze now comes with stubs for inertia scaffolding and so dose Jetstrap. To use a Bootstrap scaffold for your laravel project running on Breeze alongside inertia, simply run the code below: php artisan jetstrap:swap breeze-inertia Next you have to clean up your After that run:
...and you're done! Using the TestingRun the tests with: vendor/bin/phpunit or composer tests LicenseJetstrap is open-sourced software licensed under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论