Airdrop — Speed up your Laravel deployments by skipping asset compilation.

Building A Custom Driver

Hammerstone Refine has not launched yet. Sign up for the early access list to stay up to date!

If the Filesystem Driver isn't quite right for you, you can build your own quite easily.

Your custom driver must extend the Hammerstone BaseDriver.

CustomDriver.php

1use Hammerstone\Airdrop\Drivers\BaseDriver;
2 
3class CustomDriver extends BaseDriver
4{
5 /**
6 * Called after building, to stash the files somewhere.
7 */
8 public function upload()
9 {
10 // @TODO
11 }
12 
13 /**
14 * Called before building files, to see if we can skip that
15 * altogether and just download them.
16 */
17 public function download()
18 {
19 // @TODO
20 }
21}

The current hash will be available as a class property $hash, and the config for your driver will be available as $config.

Enabling Your Custom Driver

To enable your driver, you'll need to add it to the drivers array in airdrop.php.

config/airdrop.php

1'drivers' => [
2 'custom' => [
3 // Use our new custom class as the driver.
4 'class' => CustomDriver::class,
5 
6 // Pass in any configuration you want.
7 'key' => 'value'
8 ]
9],
Code highlighting powered by torchlight.dev, a Hammerstone product.