docs icon indicating copy to clipboard operation
docs copied to clipboard

Add command to rediscover package to Livewire docs

Open octoxan opened this issue 1 year ago • 1 comments

This command is required to be ran if you are following along with the docs.

octoxan avatar Mar 20 '24 17:03 octoxan

Are you missing the post-autoload-dump script on your install that's recommended on the Acorn installation docs?

retlehs avatar Mar 20 '24 17:03 retlehs

I am not missing that section, that command section is in there. I saw another issue someone posted who had the same problem and they fixed theirs with the command. post-autoload-dump section set up as usual.

Composer is 2.7.2. Not sure why it wouldn't be automatically discovering that Livewire is installed. It also seems to be correctly auto discovering any other packages besides the Livewire one.

CleanShot 2024-03-30 at 10 21 23@2x

octoxan avatar Mar 30 '24 14:03 octoxan

I'm not seeing post-autoload-dump fire in your screenshot.

See mine (which contains the > Roots\Acorn\ComposerScripts::postAutoloadDump output):

Screenshot

Is Acorn, Livewire, and the post-autoload-dump all in the same composer.json?

Log1x avatar Mar 30 '24 14:03 Log1x

Here's the full composer.json which is sitting inside of the theme.

{
  "name": "roots/sage",
  "type": "wordpress-theme",
  "license": "MIT",
  "description": "WordPress starter theme with a modern development workflow",
  "homepage": "https://roots.io/sage/",
  "authors": [
    {
      "name": "Ben Word",
      "email": "[email protected]",
      "homepage": "https://github.com/retlehs"
    },
    {
      "name": "Scott Walkinshaw",
      "email": "[email protected]",
      "homepage": "https://github.com/swalkinshaw"
    },
    {
      "name": "QWp6t",
      "email": "[email protected]",
      "homepage": "https://github.com/qwp6t"
    },
    {
      "name": "Brandon Nifong",
      "email": "[email protected]",
      "homepage": "https://github.com/log1x"
    }
  ],
  "keywords": [
    "wordpress"
  ],
  "support": {
    "issues": "https://github.com/roots/sage/issues",
    "forum": "https://discourse.roots.io/"
  },
  "autoload": {
    "psr-4": {
      "App\\": "app/"
    }
  },
  "require": {
    "php": ">=8.1",
    "livewire/livewire": "^3.4",
    "roots/acorn": "^4.2",
    "roots/acorn-prettify": "^1.0"
  },
  "require-dev": {
    "laravel/pint": "^1.13"
  },
  "suggest": {
    "log1x/sage-directives": "A collection of useful Blade directives for WordPress and Sage (^1.0)."
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "extra": {
    "acorn": {
      "providers": [
        "App\\Providers\\ThemeServiceProvider"
      ]
    }
  },
  "post-autoload-dump": [
    "Roots\\Acorn\\ComposerScripts::postAutoloadDump"
  ]
}

Sorry I would have just opened an issue and not PR if I realized it was just some of us. 😅

octoxan avatar Mar 30 '24 15:03 octoxan

Here's the full composer.json which is sitting inside of the theme.

{
  "name": "roots/sage",
  "type": "wordpress-theme",
  "license": "MIT",
  "description": "WordPress starter theme with a modern development workflow",
  "homepage": "https://roots.io/sage/",
  "authors": [
    {
      "name": "Ben Word",
      "email": "[email protected]",
      "homepage": "https://github.com/retlehs"
    },
    {
      "name": "Scott Walkinshaw",
      "email": "[email protected]",
      "homepage": "https://github.com/swalkinshaw"
    },
    {
      "name": "QWp6t",
      "email": "[email protected]",
      "homepage": "https://github.com/qwp6t"
    },
    {
      "name": "Brandon Nifong",
      "email": "[email protected]",
      "homepage": "https://github.com/log1x"
    }
  ],
  "keywords": [
    "wordpress"
  ],
  "support": {
    "issues": "https://github.com/roots/sage/issues",
    "forum": "https://discourse.roots.io/"
  },
  "autoload": {
    "psr-4": {
      "App\\": "app/"
    }
  },
  "require": {
    "php": ">=8.1",
    "livewire/livewire": "^3.4",
    "roots/acorn": "^4.2",
    "roots/acorn-prettify": "^1.0"
  },
  "require-dev": {
    "laravel/pint": "^1.13"
  },
  "suggest": {
    "log1x/sage-directives": "A collection of useful Blade directives for WordPress and Sage (^1.0)."
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "extra": {
    "acorn": {
      "providers": [
        "App\\Providers\\ThemeServiceProvider"
      ]
    }
  },
  "post-autoload-dump": [
    "Roots\\Acorn\\ComposerScripts::postAutoloadDump"
  ]
}

Sorry I would have just opened an issue and not PR if I realized it was just some of us. 😅

octoxan avatar Mar 30 '24 15:03 octoxan

You need to put it inside of scripts like the Acorn install docs shows.

Screenshot

Log1x avatar Mar 30 '24 15:03 Log1x

Oh my god I hate myself right now, have a good rest of your weekend lol

octoxan avatar Mar 30 '24 15:03 octoxan