From a30d64e5c2a51dd2391d80c14406fce44a09aa32 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 16 Jan 2019 21:43:12 +0000 Subject: [PATCH] Remove WebsiteBundle --- app/SculpinKernel.php | 1 - src/WebsiteBundle/Command/NewTalkCommand.php | 58 -------------------- src/WebsiteBundle/Resources/stubs/talk.md | 11 ---- src/WebsiteBundle/SculpinWebsiteBundle.php | 9 --- src/WebsiteBundle/composer.json | 5 -- 5 files changed, 84 deletions(-) delete mode 100644 src/WebsiteBundle/Command/NewTalkCommand.php delete mode 100644 src/WebsiteBundle/Resources/stubs/talk.md delete mode 100644 src/WebsiteBundle/SculpinWebsiteBundle.php delete mode 100644 src/WebsiteBundle/composer.json diff --git a/app/SculpinKernel.php b/app/SculpinKernel.php index d58b9e84..a5077eec 100644 --- a/app/SculpinKernel.php +++ b/app/SculpinKernel.php @@ -20,7 +20,6 @@ class SculpinKernel extends AbstractKernel SculpinTwigMarkdownBundle::class, SculpinFormatTalksBundle::class, - SculpinWebsiteBundle::class, ]; } } diff --git a/src/WebsiteBundle/Command/NewTalkCommand.php b/src/WebsiteBundle/Command/NewTalkCommand.php deleted file mode 100644 index baadc8a3..00000000 --- a/src/WebsiteBundle/Command/NewTalkCommand.php +++ /dev/null @@ -1,58 +0,0 @@ -setName('website:new:talk') - ->setAliases(['new-talk']) - ->setDescription('Create a new talk') - ->addArgument('title', InputArgument::REQUIRED, 'The title of the post'); - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - $title = $input->getArgument('title'); - - $filename = string($title)->slugify() . '.php'; - - if (file_exists($file = __DIR__ . "/../../../source/_talks/{$filename}")) { - $output->writeln("{$filename} already exists."); - exit(1); - } - - file_put_contents($file, $this->compileTemplate($title)); - - $output->writeln("{$filename} was created."); - } - - /** - * Load and compile the template with the correct data. - * - * @param string $title The title of the talk - * - * @return bool|mixed|string - */ - private function compileTemplate($title) - { - $contents = file_get_contents(__DIR__ . '/../Resources/stubs/talk.md'); - - return str_replace('{{ title }}', $title, $contents); - } -} diff --git a/src/WebsiteBundle/Resources/stubs/talk.md b/src/WebsiteBundle/Resources/stubs/talk.md deleted file mode 100644 index acc179b9..00000000 --- a/src/WebsiteBundle/Resources/stubs/talk.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "{{ title }}" -speakerdeck: - id: ~ - ratio: ~ - url: ~ -youtube: - id: ~ -tags: [] -events: [] ---- diff --git a/src/WebsiteBundle/SculpinWebsiteBundle.php b/src/WebsiteBundle/SculpinWebsiteBundle.php deleted file mode 100644 index ad53930d..00000000 --- a/src/WebsiteBundle/SculpinWebsiteBundle.php +++ /dev/null @@ -1,9 +0,0 @@ -