protected function registerAppBindings()
    {
        $this->app->singleton('criticalcss.storage', function ($app) {
            return new LaravelStorage(
                $app['config']->get('criticalcss.storage'),
                $app->make('filesystem')->disk($app['config']->get('filesystems.default')),
                $app['config']->get('criticalcss.pretend')
            );
        });

        $this->app->singleton('criticalcss.htmlfetcher', function ($app) {
            return new LaravelHtmlFetcher(function () {
                return require base_path('bootstrap/app.php');
            });
        });

        $this->app->singleton('criticalcss.cssgenerator', function ($app) {
            $generator = new CriticalGenerator(
                array_map('public_path', $app['config']->get('criticalcss.css')),
                $app->make('criticalcss.htmlfetcher'),
                $app->make('criticalcss.storage')
            );

            $generator->setCriticalBin(
                $app['config']->get('criticalcss.critical_bin')
            );

            $generator->setOptions(
                $app['config']->get('criticalcss.width'),
                $app['config']->get('criticalcss.height'),
                $app['config']->get('criticalcss.ignore'),
                $app['config']->get('criticalcss.timeout', 30000)
            );

            return $generator;
        });
    }