mnsami / composer-custom-directory-installer

A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.
https://packagist.org/packages/mnsami/composer-custom-directory-installer
MIT License
138 stars 27 forks source link

Custom wordpress packages can't figure out the installation path. #6

Closed onnimonni closed 10 years ago

onnimonni commented 10 years ago

Hey!

I have made a webscraper which I intend to use for installing wordpress languages through composer. It's results are located in http://languages.koodimonni.fi.

I tested this with wppackagist and private themes and plugins and they work just as they should. I even tried your monolog tutorial and it succeeded but I just can't install these into web/app/languages directory.

This package is causing my a headache: "koodimonni-language/fi": "dev-master"

Composer.json in my wordpress project:

{
  "name": "roots/bedrock",
  "type": "project",
  "license": "MIT",
  "description": "A modern WordPress stack",
  "homepage": "http://roots.io/wordpress-stack/",
  "authors": [
    {
      "name": "Scott Walkinshaw",
      "email": "scott.walkinshaw@gmail.com",
      "homepage": "https://github.com/swalkinshaw"
    },
    {
      "name": "Ben Word",
      "email": "ben@benword.com",
      "homepage": "https://github.com/retlehs"
    }
  ],
  "keywords": [
    "wordpress", "stack", "capistrano", "composer", "vagrant", "wp"
  ],
  "support": {
    "issues": "https://github.com/roots/bedrock/issues",
    "forum": "http://discourse.roots.io/category/bedrock"
  },
  "config": {
    "preferred-install": "dist",
    "generate-salts": true
  },
  "autoload": {
    "psr-0": {"Bedrock\\Installer": "scripts"}
  },
  "scripts": {
    "post-root-package-install": ["Bedrock\\Installer::addSalts"]
  },
  "repositories": [
    {
      "type": "composer",
      "url": "http://wpackagist.org"
    },
    {
      "type": "composer",
      "url": "http://languages.koodimonni.fi/"
    }
  ],
  "require": {
    "php": ">=5.3.2",
    "johnpbloch/wordpress": "*",
    "mnsami/composer-custom-directory-installer": "dev-master",
    "composer/installers": "v1.0.12",
    "vlucas/phpdotenv": "~1.0.6",

    "koodimonni-language/fi": "dev-master"
  },
  "extra": {
    "installer-paths": {
      "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
      "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
      "web/app/themes/{$name}": ["type:wordpress-theme"],
      "web/app/languages/": ["type:wordpress-language"]
    },
    "wordpress-install-dir": "web/wp"
  }
}

I included meta data of your plugin in satis of languages.koodimonni.fi. so it is included.

Composer.json for language package:

{
  "name": "koodimonni-language\/nordic",
  "type": "wordpress-language",
  "description": "Wordpress language files for language pack containing: fi, sv, ru, nb, et",
  "homepage": "www.translate.wordpress.org",
  "keywords": [
    "wordpress",
    "language"
  ],
  "authors": {
    "name": "Wordpress translators",
    "url": "http:\/\/translate.wordpress.org\/projects\/wp"
  },
  "minimum-stability": "dev",
  "require": [

  ]
}

wordpress-language type of packages are installing just fine but only into /vendor. All of these langpacks are located in http://bitbucket.org/koodimonni-languages. This is will be open effort so others can also benefit from this. Please have a look :)

mnsami commented 10 years ago

@onnimonni ... i'm very sorry for my late reply. Your problem is you are using my package without adding it in the repositories section. You must include it first, because I didn't yet publish it on packagist.org.