Skip to content

Commit 94c4700

Browse files
authored
Merge pull request #31 from bagistoplus/v2.x
V2.x
2 parents 473fa55 + 05431e7 commit 94c4700

File tree

78 files changed

+7065
-1426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+7065
-1426
lines changed

.github/workflows/run-vitest.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: run-vitest
2+
3+
on:
4+
push:
5+
paths:
6+
- 'resources/assets/editor/**/*.{ts,js,vue}'
7+
- 'resources/assets/editor/__tests__/**'
8+
- 'vitest.config.ts'
9+
- 'package.json'
10+
- 'package-lock.json'
11+
- '.github/workflows/run-vitest.yml'
12+
pull_request:
13+
paths:
14+
- 'resources/assets/editor/**/*.{ts,js,vue}'
15+
- 'resources/assets/editor/__tests__/**'
16+
- 'vitest.config.ts'
17+
- 'package.json'
18+
- 'package-lock.json'
19+
20+
jobs:
21+
test:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
25+
name: Vitest
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v6
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v6
33+
with:
34+
node-version: '20'
35+
cache: 'npm'
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Run Vitest tests
41+
run: npm run test:run

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"andreiio/blade-remix-icon": "^3.6",
2828
"blade-ui-kit/blade-heroicons": "^2.4",
2929
"blade-ui-kit/blade-icons": "^1.7",
30-
"craftile/laravel": "^0.4",
30+
"craftile/laravel": "^0.5",
3131
"illuminate/contracts": "^11.0||^12.0",
3232
"mallardduck/blade-lucide-icons": "^1.23",
3333
"matthieumastadenis/couleur": "^0.1.2",

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig({
1919
{ text: 'Guide', link: '/introduction/getting-started' },
2020
{ text: 'Theme Editor', link: '/theme-editor/overview' },
2121
{ text: 'Blog', link: '/blog/' },
22-
{ text: 'Demo', link: 'https://demo-v2.bagistoplus.com' },
22+
{ text: 'Demo', link: 'https://demo.bagistoplus.com' },
2323
{ text: 'Sections Pack', link: 'https://bagistosectionspro.com/?ref=doc' },
2424
{
2525
text: version,

docs/building-theme/adding-blocks/creating-block.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,19 @@ For other locations, you can manually register blocks in a service provider:
203203

204204
### Discover a directory
205205

206+
Use `discoverBlocksIn()` to auto-discover all blocks in a directory. The method requires two parameters:
207+
- The directory path containing your block classes
208+
- The base namespace for those blocks (defaults to `'App\\Blocks'`)
209+
206210
```php
207-
Visual::discoverBlocksIn(base_path('modules/Shared/Blocks'));
211+
Visual::discoverBlocksIn(
212+
base_path('modules/Shared/Blocks'),
213+
'Modules\\Shared\\Blocks'
214+
);
208215
```
209216

217+
This will automatically discover and register all block classes in the specified directory, matching the namespace structure to the folder structure.
218+
210219
### Register a single class
211220

212221
```php

docs/building-theme/adding-sections/creating-section.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,19 @@ For other locations, you can manually register sections in a service provider:
203203

204204
### Discover a directory
205205

206+
Use `discoverSectionsIn()` to auto-discover all sections in a directory. The method requires two parameters:
207+
- The directory path containing your section classes
208+
- The base namespace for those sections (defaults to `'App\\Sections'`)
209+
206210
```php
207-
Visual::discoverSectionsIn(base_path('modules/Shared/Sections'));
211+
Visual::discoverSectionsIn(
212+
base_path('modules/Shared/Sections'),
213+
'Modules\\Shared\\Sections'
214+
);
208215
```
209216

217+
This will automatically discover and register all section classes in the specified directory, matching the namespace structure to the folder structure.
218+
210219
### Register a single class
211220

212221
```php

0 commit comments

Comments
 (0)