Skip to content

Conversation

@JodiWarren
Copy link
Contributor

I've removed the extraneous console.log, as it was really filling up the console on longer pages. I don't think it's necessary outside plugin development tbh.

I've also deleted the unused minified JS file, and elaborated on the Composer installation a little more.

@nickforddev nickforddev merged commit 7bdc1d2 into nickforddev:master Oct 21, 2016
@nickforddev
Copy link
Owner

Agreed, thank you for doing that.

Do I need to add this to Packagist to allow for the composer installation you described? Or does composer require use a github URL? Your example says composer require nickford/acf-swatch, and I'm not quite sure where the last argument is coming from, since it doesn't match the Github URL and it's not in the Packagist repository.

Thanks again!

@JodiWarren
Copy link
Contributor Author

Hey, sorry for the lack of reply - I think my GH notifications are kinda messed up.

Anyway, it matches nickford/acf-swatch against the name key in the repo's composer.json.

I'm no Composer expert, but this as I understand it. When you type composer require nickford/acf-swatch, it searches all the known repos in the order specified in a project's composer.json for a package with the name of nickford/acf-swatch. Since this github repo is in the repository list, it'll look in here. It will see that it has a composer.json file and look at the name key in there. Composer will say "Oh, it matches the search term" and then use the contents of this repo to fulfil it's dependency request.

As I said, I'm not a very experienced Composer user at all, so apologies if that's not correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants