Bolt\Composer\ScriptHandler::configureGitIgnore PHP Method

configureGitIgnore() protected static method

Optionally copy in Bolt's .gitignore file.
protected static configureGitIgnore ( Composer\Script\Event $event )
$event Composer\Script\Event
    protected static function configureGitIgnore(Event $event)
    {
        $boltDir = sprintf('%s/bolt/bolt/', $event->getComposer()->getConfig()->get('vendor-dir'));
        $question = sprintf('<info>Do you want to override the existing <comment>.gitignore</comment> file with the more restrictive one from <comment>vendor/bolt/bolt</comment>?</info>');
        $confirm = $event->getIO()->askConfirmation($question, false);
        if ($confirm) {
            $fs = new Filesystem();
            $fs->copy($boltDir . '.gitignore', getcwd() . '/.gitignore', true);
        }
    }