roots / docs

📝 Documentation for Roots projects
https://roots.io/docs/
168 stars 183 forks source link

Add command to rediscover package to Livewire docs #509

Closed octoxan closed 5 months ago

octoxan commented 5 months ago

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

retlehs commented 5 months ago

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

octoxan commented 5 months ago

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

Log1x commented 5 months ago

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?

octoxan commented 5 months ago

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": "ben@benword.com",
      "homepage": "https://github.com/retlehs"
    },
    {
      "name": "Scott Walkinshaw",
      "email": "scott.walkinshaw@gmail.com",
      "homepage": "https://github.com/swalkinshaw"
    },
    {
      "name": "QWp6t",
      "email": "hi@qwp6t.me",
      "homepage": "https://github.com/qwp6t"
    },
    {
      "name": "Brandon Nifong",
      "email": "brandon@tendency.me",
      "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 commented 5 months ago

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": "ben@benword.com",
      "homepage": "https://github.com/retlehs"
    },
    {
      "name": "Scott Walkinshaw",
      "email": "scott.walkinshaw@gmail.com",
      "homepage": "https://github.com/swalkinshaw"
    },
    {
      "name": "QWp6t",
      "email": "hi@qwp6t.me",
      "homepage": "https://github.com/qwp6t"
    },
    {
      "name": "Brandon Nifong",
      "email": "brandon@tendency.me",
      "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. 😅

Log1x commented 5 months ago

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

Screenshot

octoxan commented 5 months ago

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