Exemplo n.º 1
0
 public function fire()
 {
     $themeName = $this->ask('Please enter the theme name in the following format: vendor/name');
     list($vendor, $name) = $this->separateVendorAndName($themeName);
     $type = $this->choice('Would you like to create a front end or backend theme ?', ['Frontend', 'Backend'], 0);
     $this->themeScaffold->setName($name)->setVendor($vendor)->forType(strtolower($type))->generate();
     $this->info("Generated a fresh theme called [{$themeName}]. You'll find it in the Themes/ folder");
 }
Exemplo n.º 2
0
 /** @test */
 public function it_creates_empty_assets_folder()
 {
     $this->scaffold->setFiles(['assetsFolder']);
     $this->generateFrontendTheme();
     $this->assertTrue($this->finder->isDirectory($this->testThemePath . '/assets'));
     $this->assertTrue($this->finder->isDirectory($this->testThemePath . '/assets/css'));
     $this->assertTrue($this->finder->isDirectory($this->testThemePath . '/assets/js'));
     $this->assertTrue($this->finder->isDirectory($this->testThemePath . '/assets/images'));
     $this->assertTrue($this->finder->isFile($this->testThemePath . '/assets/!!.gitignore'));
     $this->assertTrue($this->finder->isFile($this->testThemePath . '/assets/css/!!.gitignore'));
     $this->assertTrue($this->finder->isFile($this->testThemePath . '/assets/js/!!.gitignore'));
     $this->assertTrue($this->finder->isFile($this->testThemePath . '/assets/images/!!.gitignore'));
 }