mirror of
https://github.com/getgrav/grav.git
synced 2026-01-29 10:50:04 +01:00
Remove local checks; Delete twigtemplates; update inheritence theme
All components could use some ❤️
This commit is contained in:
@@ -103,6 +103,10 @@ class DevToolsCommand extends ConsoleCommand
|
||||
$file = File::instance($componentFolder . DS . str_replace('.twig', '', $templateFile));
|
||||
$file->content($content);
|
||||
$file->save();
|
||||
|
||||
//Delete twig template
|
||||
$file = File::instance($componentFolder . DS . $templateFile);
|
||||
$file->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,10 +134,10 @@ class DevToolsCommand extends ConsoleCommand
|
||||
case 'name':
|
||||
//Check If name
|
||||
if ($value == null || trim($value) == '') {
|
||||
throw new \RuntimeException('Plugin Name cannot be empty');
|
||||
throw new \RuntimeException('Name cannot be empty');
|
||||
}
|
||||
if (false != $this->gpm->findPackage($value) || false != $this->gpm->isPluginInstalled($value) || false != $this->gpm->isThemeInstalled($value)) {
|
||||
throw new \RuntimeException('Package exists (either as theme or plugin)');
|
||||
if (false != $this->gpm->findPackage($value)) {
|
||||
throw new \RuntimeException('Package name exists in GPM');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# @@NAME@@
|
||||
|
||||
The **@@NAME@@** Theme is for [Grav](http://github.com/getgrav/grav)
|
||||
|
||||
@@DESCRIPTION@@
|
||||
@@ -0,0 +1,5 @@
|
||||
# {{ component.name|titleize }}
|
||||
|
||||
The **{{ component.name|titleize }}** Plugin is for [Grav](http://github.com/getgrav/grav)
|
||||
|
||||
{{ component.description }}
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
namespace Grav\Theme;
|
||||
|
||||
class Mytheme extends Antimatter
|
||||
{
|
||||
// Some new methods, properties etc.
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Grav\Theme;
|
||||
|
||||
class {{ component.name|variableize }} extends {{ component.extends|variableize }}
|
||||
{
|
||||
// Some new methods, properties etc.
|
||||
}
|
||||
?>
|
||||
@@ -1,8 +0,0 @@
|
||||
streams:
|
||||
schemes:
|
||||
theme:
|
||||
type: ReadOnlyStream
|
||||
prefixes:
|
||||
'':
|
||||
- user/themes/mytheme
|
||||
- user/themes/antimatter
|
||||
@@ -0,0 +1,8 @@
|
||||
streams:
|
||||
schemes:
|
||||
theme:
|
||||
type: ReadOnlyStream
|
||||
prefixes:
|
||||
'':
|
||||
- user/themes/{{ component.name|hyphenize }}
|
||||
- user/themes/{{ component.extends }}
|
||||
Reference in New Issue
Block a user