@@ -128,10 +128,10 @@ Now hit the `d` key to toggle between light and dark themes, and your choice wil
128128php artisan vendor:publish --tag=theme-switch-2-states-js
129129```
130130
131- That will copy the scripts to ` resources/js/theme-switch-two-states/[theme- init.js, theme- switch.js] ` .
131+ That will copy the scripts to ` resources/js/theme-switch-two-states/[init-script .js, switch-script .js] ` .
132132
133- ` theme- init.js` - initializes the theme based on the user's previous choice stored in ` localStorage ` .
134- ` theme- switch.js` - a function to toggle between light and dark themes by hitting a selected KEY and saves the choice in ` localStorage ` .
133+ ` init-script .js ` - initializes the theme based on the user's previous choice stored in ` localStorage ` .
134+ ` switch-script .js ` - a function to toggle between light and dark themes by hitting a selected KEY and saves the choice in ` localStorage ` .
135135
136136** Step 2** : Register the scripts in your ` AppServiceProvider ` :
137137
@@ -142,11 +142,11 @@ class AppServiceProvider extends ServiceProvider
142142 {
143143 BladeInlineScripts::takeFiles(
144144 [
145- resource_path('js/theme-switch-two-states/theme- init.js'),
145+ resource_path('js/theme-switch-two-states/init-script .js'),
146146 ['__DARK__' => 'dark'], // variables to replace in the script
147147 ],
148148 [
149- resource_path('js/theme-switch-two-states/theme- switch.js'),
149+ resource_path('js/theme-switch-two-states/switch-script .js'),
150150 ['__DARK__' => 'dark', '__LIGHT__' => 'light', '__TOGGLE_KEY__' => 'd'], // variables to replace in the script
151151 ]
152152 )->registerAs('themeSwitchScripts');
0 commit comments