Download the PHP package hungrysandwichclub/thunderblight without Composer

On this page you can find all versions of the php package hungrysandwichclub/thunderblight. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thunderblight

Thunderblight

Craft CMS

Tunderblight is a Craft CMS plugin which makes using Vite ⚡️ manifest files easy.

Extends twig to decode the manifest.json format produced by Vite on build.

Requirements

This module requires Craft CMS 3.0.0-RC1 or later.

Installation

Install the plugin using composer in your Craft project:

composer require hungrysandwichclub/thunderblight

Usage

Once installed activated in Craft (Settings → Plugins) you can then use Thunderblight in your twig files as a filter:

This will look for a manifest file created by Vite, you must specify this in your Vite config by setting the build.output path. You will need to also enable the build.manifest option by setting it to true. For more information please check the Vite Config Documention.

With this object you can then output your static files and assets like so:

This will support chunking of files.

We recommend using Craft's Environment variable found in your .env file to make appropriate checks to serve correct files. More information can be found in the Craft Documentation about configuring your project.

Vite Config

With this setup your project will now work with your build files after running npm run build in your vite src folder. But how about local development? I hear you ask.

If you're running your Craft installation locally we recommend running the Vite dev server on a different port to your current project, then we can treat the dev server as an external host for our files and retrieve them like we would from a CDN. For more information on setting this up please check Vite's Backend Intergration Guide..

With the above teachings applied we'd include our files like so:

<link rel="stylesheet" href="http://localhost:3000/scss/_entry.scss" />
<script type="module" src="http://localhost:3000/@vite/client"></script>
<script type="module" src="http://localhost:3000/js/_entry.js"></script>

We've included an example vite.config.js file in the example folder in this repo to get you up and running quickly.

With all these steps in place we have the following code:

We've left this open to your interpretation should you prefer to load your assets using a different strategy, we'd love to hear your thoughts on how this could be improved!

Thunderblight roadmap

Some things to do, and ideas for potential features:

Useful Links and Credits


All versions of thunderblight with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hungrysandwichclub/thunderblight contains the following files

Loading the files please wait ....