macek/jquery-serialize-object

Add support for distribution via Composer package manager.

pnikolov opened this issue · 2 comments

Can you add a composer.json file adding support for https://getcomposer.org package manager.

Sample composer.json file contents:

{
  "name": "macek/jquery-serialize-object",
  "description": "Adds the method serializeObject to jQuery, to perform complex form serialization into JavaScript objects.",
  "license": "Copyright (c) 2014, Paul Macek",
  "authors": [
    {
      "name": "Paul Macek",
      "homepage": "https://github.com/macek/jquery-serialize-object"
    }
  ],
  "require": {
    "components/jquery": ">=1.2"
  }
}

After having this file, it should be registered manually in https://packagist.org/packages/submit

I don't agree. This is a JS lib, it should be available on npmjs.org (and it is).
If you want to require a node package, use a package.json and https://github.com/eloquent/composer-npm-bridge.

macek commented

I didn't feel right to add this to Composer's package repository. If we take this mindset, then every package we release should be published to every package manager's repos just so users of that particular package manager have access to it. The amount of duplication would be tremendous. Not to mention, I don't particularly care to learn the idiomatic usage of each manager.

@alex-pex I wasn't aware of Composer NPM Bridge, but it seems like a perfect solution for those looking to include npm packages in their PHP projects. Thanks for your comment.