webroot-installer icon indicating copy to clipboard operation
webroot-installer copied to clipboard

Use dist instead source

Open edpittol opened this issue 8 years ago • 2 comments

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": "[email protected]"
        }
    ],
    "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

edpittol avatar May 05 '16 14:05 edpittol

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.

sbuzonas avatar Jun 08 '18 20:06 sbuzonas

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.

edpittol avatar Jun 10 '18 20:06 edpittol