Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Adding a basic composer.json #15

Open
fvsch opened this issue Sep 3, 2016 · 4 comments
Open

Adding a basic composer.json #15

fvsch opened this issue Sep 3, 2016 · 4 comments
Assignees
Milestone

Comments

@fvsch
Copy link

fvsch commented Sep 3, 2016

Hi,

It would be nice to add a simple composer.json file to this repo, to make installation with Composer quite easier.

It could look like:

{
  "name": "fabianmichael/kirby-typography",
  "description": "This is a port of [wp-Typography](https://de.wordpress.org/plugins/wp-typography/) for Kirby CMS. Based on the `PHP_Typography` class, this plugin enhances the typography of you kirby-powered website. Think of it a more advanced alternative to the built-in `SmartyPants` parser.",
  "authors": [{"name": "Fabian Michael"}],
  "license": "GPL-3.0"
}

The "version" key is optional, and it’s recommended to omit it to let Composer (and Packagist) retrieve the available versions from git tags. Note that Composer will only see those tags which have a composer.json file, so if you add a commit with a composer.json you will need to add a tag.

It could be nice to publish this package on Packagist as well.

Use case

If one wants to install this plugin with Composer today, one needs a verbose definition:

{
  "minimum-stability": "beta",
  "require": {
    "fabianmichael/kirby-typography": "^1.0.0"
  },
  "repositories": [
    {
      "type": "package",
      "package": {
        "name": "fabianmichael/kirby-typography",
        "version": "1.0.0",
        "source": {
          "type": "git",
          "url": "https://github.com/fabianmichael/kirby-typography.git",
          "reference": "1.0.0-beta1"
        }
      }
    }
  ]
}

With a composer.json in this repo, it gets shorter:

{
  "minimum-stability": "beta",
  "require": {
    "fabianmichael/kirby-typography": "^1.0.0"
  },
  "repositories": [
    { "type": "vcs", "url": "https://github.com/fabianmichael/kirby-typography" }
  ]
}

And if this package is also published on Packagist, you can just use:

{
  "minimum-stability": "beta",
  "require": {
    "fabianmichael/kirby-typography": "^1.0.0"
  }
}
@fabianmichael fabianmichael added this to the 1.1.0 milestone Sep 5, 2016
@fabianmichael
Copy link
Owner

Thanks for your question. I will further investigate this in October, because September is currently blocked by other projects.

Cheers
Fabian

@fabianmichael fabianmichael self-assigned this Sep 5, 2016
@fvsch
Copy link
Author

fvsch commented Sep 5, 2016

A bit of information for when you can come back to this issue.

The "Publishing Packages" column on the home of https://packagist.org/ has very concise information. There are very few steps involved.

  1. Committing a composer.json in this project.
    (See for instance the one I’m using in kirby-staticbuilder.)
  2. If you want to publish on Packagist too:
    1. Creating a user account on Packagist
    2. Submitting the project's GitHub URL in a form

@fabianmichael
Copy link
Owner

Just a brief update: I did not forget about Kirby-Typography, but the last months brought a lot of work for me. But in the meantime, wp-Typography also brought a lot of interesting updates I want to integrate as best as I can. I will continue my work on the plugin as soon as possible.

Thanks for your patience.

@mundschenk-at
Copy link

Integration should be easier now with the composer package for PHP-Typography.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants