tomschlick / laravel-http2-server-push

A middleware package for Laravel to enable server push for your script, style, and image assets.
MIT License
167 stars 20 forks source link

Support L5.4 #12

Closed paulschwarz closed 7 years ago

paulschwarz commented 7 years ago

The composer file avoids support for 5.4, and rightly so because we're now on mix instead of elixir. Any plans to support this?

tomschlick commented 7 years ago

Done https://github.com/tomschlick/laravel-http2-server-push/releases/tag/v0.1.4

paulschwarz commented 7 years ago

Thanks, but still a small issue. Laravel 5.4 ships with mix instead of elixir. While it's possible to use either/or, the scheme for mix has changed a little.

The elixir() helper has been replaced by mix() and the manifest is in a different path public/mix-manifest.json.

An example of a mix manifest is as follows:

{
  "/js/app.js": "/js/app.328b215b91136cfd99c0.js",
  "/js/vendor.js": "/js/vendor.d1d8c9b3c0d96d0e6c94.js",
  "/css/app.css": "/css/app.acb9296df976f0a8889c.css",
  "/js/manifest.js": "/js/manifest.d41d8cd98f00b204e980.js"
}

And if it helps, here's a link to the new mix method https://github.com/laravel/framework/blob/5.4/src/Illuminate/Foundation/helpers.php#L551-L592

tomschlick commented 7 years ago

Any chance you could submit a PR to fix this? I just don't have time today to get it out.

If so, please add a config item for which version of elixir so we can continue to support both.

paulschwarz commented 7 years ago

Please include instructions on how to run your tests.

paulschwarz commented 7 years ago

See https://github.com/tomschlick/laravel-http2-server-push/pull/13