Skip to content

Commit 187b3e6

Browse files
committed
fix: "switch" is not a good js funciton name
1 parent 3d4b79b commit 187b3e6

File tree

7 files changed

+5
-5
lines changed

7 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zmyslny/laravel-inline-scripts",
3-
"description": "Converts your JavaScript code, stored in a file or files, into a custom blade directive and inline it in HTML.",
3+
"description": "Converts your JavaScript code, stored in files, into a custom blade directive and inline it in HTML.",
44
"license": "MIT",
55
"type": "package",
66
"require": {

scripts/ThemeSwitchTwoStates/InitScript.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class InitScript extends FromFileWithPlaceholders
1010
{
11-
protected string $fileName = 'init';
11+
protected string $fileName = 'init-script';
1212

1313
protected string $fileDirectory = __DIR__.'/../../resources/js/theme-switch-two-states';
1414

scripts/ThemeSwitchTwoStates/SwitchScript.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SwitchScript extends FromFileWithPlaceholders
1414

1515
public const KEY_PATTERN = '/^[a-z]$/';
1616

17-
protected string $fileName = 'switch';
17+
protected string $fileName = 'switch-script';
1818

1919
protected string $fileDirectory = __DIR__.'/../../resources/js/theme-switch-two-states';
2020

tests/js/theme-switch-two-states/init.test.js renamed to tests/js/theme-switch-two-states/init-script.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from "node:fs";
33
import path from "node:path";
44

55
// Path to the raw JS template (with placeholders) used by PHP to generate a runtime script
6-
const scriptPath = path.resolve(process.cwd(), "resources/js/theme-switch-two-states/init.js");
6+
const scriptPath = path.resolve(process.cwd(), "resources/js/theme-switch-two-states/init-script.js");
77

88
const DEFAULT_DARK = "dark";
99
const DEFAULT_LIGHT = "light";

tests/js/theme-switch-two-states/switch.test.js renamed to tests/js/theme-switch-two-states/switch-script.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from "node:fs";
33
import path from "node:path";
44

55
// Path to the raw JS template (with placeholders) used by PHP to generate a runtime script
6-
const scriptPath = path.resolve(process.cwd(), "resources/js/theme-switch-two-states/switch.js");
6+
const scriptPath = path.resolve(process.cwd(), "resources/js/theme-switch-two-states/switch-script.js");
77

88
const DEFAULT_TOGGLE_KEY = "d";
99
const DEFAULT_DARK = "dark";

0 commit comments

Comments
 (0)