public function initialize($vendor, $package, $directory)
    {
        if (!$this->files->exists($directory) || !$this->files->isDirectory($directory)) {
            throw new InvalidPathException("{$directory} does not exist or is not a valid directory.");
        }

        $packageComposer = new Package;
        $packageComposer->setVendor($vendor);
        $packageComposer->setPackage($package);
        $packageComposer->setDescription('Give your package template a good description');
        $packageComposer->setLicense(user_config('configuration.license', ''));
        $packageComposer->setAuthors(user_config('configuration.authors', []));

        $writer = new ConfigurationWriter($packageComposer->toArray());
        $writer['config'] = (object)['vendor-dir' => '_newup_vendor'];

        $writer->save($directory.'/composer.json');
        $this->renderer->setData('package', $package);
        $this->renderer->setData('vendor', $vendor);

        $packageClass = $this->renderer->render('template');

        if (!$this->files->exists($directory.'/_newup/')) {
            $this->files->makeDirectory($directory.'/_newup/');
        }

        if ($this->shouldCreateTemplateDirectory && $this->files->exists($directory.'/_template') == false) {
            $this->files->makeDirectory($directory.'/_template');
        }

        $this->files->put($directory.'/_newup/Package.php', $packageClass);
    }