تماشای این درس نیاز به اشتراک حرفه‌ای دارد.

Overview of starter kits0:00

Let's talk starter kits. Starter kits are pre-built site packages, some of them are fully designed, fully built, ready to go, and others are more of a boilerplate for developers to kind of jumpstart their own projects. Peak is a great example of a great boilerplate starter kit. For the sake of examples, let's just take this Stumblr one that I built, and let's get it installed. So right here you can have an install command, we'll copy that, go to our terminal,

Installing a starter kit0:32

So right here you can have an install command, we'll copy that, go to our terminal, and we'll run static new, name it larastumble, and let that run. When it's done, it'll ask if you want a super user, go ahead and create that. It's already started. Now we'll go to larastumble, we'll open it in Valet,

Now we'll go to larastumble, we'll open it in Valet, and we'll create a new User, we'll open it in Valet, you can see the site is already running. If we went to the control panel, sign in with that User, we are good to go. You can tweak your site details, you can set your basic site information and some theme data,

Exporting your own kit2:02

Let's go back to our Larasmash Heavy88 DeLorean rental site, and let's turn this into a starter kit. We're going to run php starter kit export, and then the name of the kit. We'll call it Heavy88. The configuration file doesn't exist because we're just creating it for the first time, so we'll have it created now. Now we have this starterkit.yaml file, we'll find that in the root of our project, starterkit.yaml, and now we configure everything that we want to have exported.

Configuring starterkit.yaml2:30

we'll find that in the root of our project, starterkit.yaml, and now we configure everything that we want to have exported into the starter kit. The way starterkit works is it is simply the files that should be added to a fresh install to make your site work. This allows us to skip all the dependencies and everything, and just drop in your content files, your resources, and have it all done for you programmatically. So let's turn all these on. We're going to export content. We didn't modify file systems for this,

So let's turn all these on. We're going to export content. We didn't modify file systems for this, or assets, so we don't need to worry about that. Blueprints, CSS, views, assets, public CSS, webpack. We also have a few files in image, and I believe we have a route. Yep. So we'll add routes/web.php. We'll come back to our command line,

Choosing export location3:22

So we'll add routes/web.php. We'll come back to our command line, rerun that export. It's going to suggest a path and where it wants to create it. So in this case, it would be a subdirectory. If you want to, you can tell it to export to heavy88 by one directory above. Maybe call it starterkit so you know. It doesn't exist. Let's create it.

Reviewing exported files3:47

Maybe call it starterkit so you know. It doesn't exist. Let's create it. And it now exists. So if we go to heavy88/starterkit, and look at this, we can see just the contents of content, public, we've got our assets, we've got our CSS, we've got our images, everything's ready to go. Now all you need to do is publish that to the static marketplace,

Installing Starter KitsCreating a Starter Kit

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟