Skip to content

Commit

Permalink
feat: add module.info.php file
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Mar 3, 2023
1 parent 4a3eb65 commit 04f91d7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
20 changes: 20 additions & 0 deletions RockFrontend.info.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace ProcessWire;

$package = json_decode(file_get_contents(__DIR__ . "/package.json"));

$info = [
'title' => 'RockFrontend',
'version' => $package->version,
'summary' => 'Module for easy frontend development',
'autoload' => true,
'singular' => true,
'icon' => 'paint-brush',
'requires' => [
'PHP>=8.0',
],
// The module will work without RockMigrations but you will have to create
// the layout field manually and add it to templates if you want to use it
// I'm not using the layout field though, so this feature might be dropped
];
18 changes: 0 additions & 18 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,6 @@ class RockFrontend extends WireData implements Module, ConfigurableModule
/** @var array */
private $translations = [];

public static function getModuleInfo()
{
return [
'title' => 'RockFrontend',
'version' => '2.27.0',
'summary' => 'Module for easy frontend development',
'autoload' => true,
'singular' => true,
'icon' => 'paint-brush',
'requires' => [
'PHP>=8.0',
],
// The module will work without RockMigrations but you will have to create
// the layout field manually and add it to templates if you want to use it
// I'm not using the layout field though, so this feature might be dropped
];
}

public function __construct()
{
if (!$this->wire->config->livereload) return;
Expand Down

0 comments on commit 04f91d7

Please sign in to comment.