Skip to content

Commit

Permalink
1.0.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 28, 2024
1 parent 629f5ed commit f4ef965
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Release Notes for Spark

## 1.0.0-alpha.1 - 2024-10-28

- Initial alpha release.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "putyourlightson/craft-spark",
"description": "A real-time, template-driven hypermedia framework for Craft.",
"version": "0.0.13",
"version": "1.0.0-alpha.1",
"type": "craft-plugin",
"license": "proprietary",
"require": {
"php": ">=8.2",
"craftcms/cms": "^5.4.0",
"putyourlightson/datastar-php": "0.0.4"
"craftcms/cms": "^5.4",
"putyourlightson/datastar-php": "1.0.0"
},
"require-dev": {
"craftcms/ecs": "dev-main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @copyright Copyright (c) PutYourLightsOn
*/

namespace putyourlightson\spark\helpers;
namespace putyourlightson\spark\twigextensions;

use Craft;
use craft\helpers\Json;
Expand All @@ -14,7 +14,7 @@
use ReflectionProperty;
use Twig\Error\SyntaxError;

class SparkHelper
class SparkFunctions
{
public const ALLOWED_METHODS = ['get', 'post', 'put', 'patch', 'delete'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* @copyright Copyright (c) PutYourLightsOn
*/

namespace putyourlightson\spark\variables;
namespace putyourlightson\spark\twigextensions;

use putyourlightson\spark\models\ConsoleModel;
use putyourlightson\spark\Spark;
use yii\web\Response;

class SparkVariable
class SparkGlobal
{
/**
* Runs an action and returns the response.
Expand Down
12 changes: 5 additions & 7 deletions src/twigextensions/SparkTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

namespace putyourlightson\spark\twigextensions;

use putyourlightson\spark\helpers\SparkHelper;
use putyourlightson\spark\twigextensions\tokenparsers\FragmentTokenParser;
use putyourlightson\spark\variables\SparkVariable;
use Twig\Extension\AbstractExtension;
use Twig\Extension\GlobalsInterface;
use Twig\TwigFunction;
Expand All @@ -20,10 +18,10 @@ class SparkTwigExtension extends AbstractExtension implements GlobalsInterface
public function getFunctions(): array
{
return [
new TwigFunction('spark', [SparkHelper::class, 'spark']),
new TwigFunction('sparkUrl', [SparkHelper::class, 'sparkUrl']),
new TwigFunction('sparkStore', [SparkHelper::class, 'sparkStore']),
new TwigFunction('sparkStoreFromClass', [SparkHelper::class, 'sparkStoreFromClass']),
new TwigFunction('spark', [SparkFunctions::class, 'spark']),
new TwigFunction('sparkUrl', [SparkFunctions::class, 'sparkUrl']),
new TwigFunction('sparkStore', [SparkFunctions::class, 'sparkStore']),
new TwigFunction('sparkStoreFromClass', [SparkFunctions::class, 'sparkStoreFromClass']),
];
}

Expand All @@ -33,7 +31,7 @@ public function getFunctions(): array
public function getGlobals(): array
{
return [
'spark' => new SparkVariable(),
'spark' => new SparkGlobal(),
];
}

Expand Down

0 comments on commit f4ef965

Please sign in to comment.