fancyguy / webroot-installer

Composer Installer for packages that live in the webroot of a project.
Other
125 stars 22 forks source link

Use dist instead source #10

Open edpittol opened 8 years ago

edpittol commented 8 years ago

The clone of the WordPress package is heavy. It's not necessary download the package. I used another solution that is lighter. Use a dist package referencing the WordPress zip package.

This is the README example using zip dist package.

{
    "name": "fancyguy/www-fancyguy-com",
    "description": "Package to build www.fancyguy.com",
    "authors": [
        {
            "name": "Steve Buzonas",
            "email": "steve@fancyguy.com"
        }
    ],
    "repositories": [
        {
            "type" : "package",
            "package" : {
                "name" : "wordpress/wordpress",
                "type" : "webroot",
                "version" : "4.5.1",
                "dist" : {
                    "type" : "zip",
                    "url" : "https://wordpress.org/wordpress-4.5.1.zip"
                },
                "require" : {
                    "fancyguy/webroot-installer" : "^1.0"
                }
            }
        }
    ],
    "require": {
        "wordpress/wordpress": "4.5.*"
    },
    "extra": {
        "webroot-dir": "content",
        "webroot-package": "wordpress/wordpress"
    }
}

Another option is use the no-content package. This package not download the defaults plugins and themes.

https://wordpress.org/wordpress-4.5.1-no-content.zip

sbuzonas commented 6 years ago

Thanks, I didn't know about the no-content dists. I've updated https://github.com/fancyguy/composer-wordpress-plugin to use that url.

I'll update the readme. Using WordPress was just an arbitrary example, but many people have copied it verbatim.

edpittol commented 6 years ago

Cool.

The no-content package hasn't the default dist themes and plugins. Which is better when it's used the Composer to manage the dependencies. If some these default packages are necessary, they must be added in the composer.json files.