fabianmichael / kirby-typography

Typographic enhancements for your Kirby-driven website.
GNU General Public License v3.0
78 stars 4 forks source link

Adding a basic composer.json #15

Open fvsch opened 8 years ago

fvsch commented 8 years ago

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 commented 8 years ago

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

Cheers Fabian

fvsch commented 8 years ago

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 commented 7 years ago

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 commented 7 years ago

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