Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release as a Composer package #5

Merged
merged 2 commits into from
Sep 21, 2014
Merged

Conversation

gocom
Copy link
Contributor

@gocom gocom commented May 23, 2013

Hi, first of all, thank you for creating this PHP port of YUI CSS compressor. It has come handy.

Getting this thing on Composer would be awesome. This library is one of the few last libraries, that I use, that aren't available though composer.

Composer might seem pretty confusing if you aren't already familiar with it, but fear not; getting a Composer package out there isn't hard. At minimum it only requires the JSON meta file (as in the PR). Adding the meta file is the minimum, but to get most out of Composer, the library should also be registered on the central repository, Packagist. Registering the package makes consuming it easier, as you can refer to it by its short name (see the slightly altered README.md in the PR).

To make version contraints resolvable, the repository should use semantic versioning, which is what Composer uses. Otherwise users can not define contraints; Users can fetch the library, but only by referencing a commit, a tag, a branch or by a wildcard.

In short, this all comes down to few simple steps;

  1. Add composer.json meta file to the repository.
  2. Register an account to Packagist
  3. After you have an account, you can submit the repository to the central index. Click the big submit package button, and enter in the link to the URL to the repository.
  4. After done, you could also add a service hook on GitHub to Packagist. This makes sure Packagist gets informed about any new commits and releases. You can find Packagist service on GitHub, and Packagist key on your Packagist profile page.
  5. Create semver tags on releases/milestones (e.g. 2.4.71, 2.4.8, 3.2.6-alpha.1).

Regards,
Jukka

@tubalmartin
Copy link
Owner

Will do Jukka! Thanks!

@zeleznypa
Copy link

👍 Please merge this

@PavloKovalov
Copy link

👍

@aMoniker
Copy link

Another 👍 - this would be great in composer!

@glensc
Copy link
Contributor

glensc commented Sep 18, 2014

@tubalmartin looks good, but i wouldn't take that semver stuff too seriously, it's recommendation not requirement. if you have you own versioning schema, that's fine.

i just hope the semver is the reason why you haven't merged this yet.

tubalmartin added a commit that referenced this pull request Sep 21, 2014
Release as a Composer package
@tubalmartin tubalmartin merged commit 9a2d03f into tubalmartin:master Sep 21, 2014
@glensc
Copy link
Contributor

glensc commented Sep 21, 2014

please register the package in packagist.org as well (step 2), otherwise it does not work

@tubalmartin
Copy link
Owner

It's on packagist already.

@glensc
Copy link
Contributor

glensc commented Sep 22, 2014

ok, but no tags. can you push at least some tags out? i think their web interface had something. Force Update or Edit

https://packagist.org/packages/tubalmartin/cssmin

as i tried "tubalmartin/cssmin": "~2.4.8" and got error

@tubalmartin
Copy link
Owner

Tag v2.4.8-p4 pushed. "p" stands for "patch". :)

@glensc
Copy link
Contributor

glensc commented Sep 22, 2014

so, it did not liked your a.b.c-x versioning?

@tubalmartin
Copy link
Owner

Yeah, it wasn't semver compliant. Adding a letter after the dash makes it
semver compliant :)

Túbal Martín

2014-09-22 10:45 GMT+02:00 Elan Ruusamäe notifications@github.com:

so, it did not liked your a.b.c-x versioning?


Reply to this email directly or view it on GitHub
#5 (comment)
.

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.

None yet

6 participants