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

Configure composer metadata0:00

Let's now deploy this code to GitHub and then package it. To do that, I will go to composer.json, and the name up here is how you will install the package. Why don't we also give it a basic description? And I'll be quick. Load and parse VTT files. It's good for now. Next, because we're putting this under the Laracast namespace, I will set my email accordingly. Let's set up the require-dev. It can be useful to declare the minimum PHP requirement.

Initialize Git and repo0:23

Let's set up the require dev. It can be useful to declare the minimum php requirement. So in our case, that's going to be, I believe, 8.0. And I could say greater than or equal to 8.0. Okay, so now let's initialize Git. I'm going to add everything to the staging area and commit with initial implementation. Next, I'll switch to GitHub, and let's add a new repository. Transcriptions.

Create GitHub repository0:47

and let's add a new repository. Transcriptions. And I'll add that exact same description as before. It'll be public. We should add a README file. We'll do that shortly. And then we'll call createRepository. Okay. Now we'll push our existing repo. And if I come back and give this a refresh, we should be up and running.

Tag and create release2:55

I can either do that from the command line, or you can do it directly from GitHub. Let's create a release. I'm going to make the target just the most recent commit, or I could do a specific commit, as you see there. My tag will be 0.1.0. And the title will be the same thing. Okay, now depending upon the size of your project, you might want to flesh out the description. So, for example, if you're on a big project

Install package via Composer3:35

hopefully it's pulled in, and yes, it is. So now let's try pulling it in. I'm going to switch over to my Laracasts code base. I'm going to check out a new branch for transcriptions. And then I will install this package. composer require laracasts/transcriptions. And there we go. Just like that, I can now get to work.

GitHub TaggingPackagist Workflow

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