Skip to content

Commit bde7f51

Browse files
authored
Merge pull request #610 from wayofdev/feat/docs
2 parents 70d3603 + 3b8df63 commit bde7f51

File tree

13 files changed

+712
-11
lines changed

13 files changed

+712
-11
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ EXPORT_VARS = '\
2929
$${COMPOSE_PROJECT_NAME} \
3030
$${COMPOSER_AUTH}'
3131

32+
NPM_RUNNER ?= pnpm
33+
3234

3335
# Self documenting Makefile code
3436
# ------------------------------------------------------------------------------------
@@ -182,3 +184,9 @@ test: ## Run project php-unit and pest tests
182184
test-cc: ## Run project php-unit and pest tests in coverage mode and build report
183185
$(APP_COMPOSER) test:cc
184186
.PHONY: test-cc
187+
188+
# Documentation
189+
# ------------------------------------------------------------------------------------
190+
docs-deps-update: ## Check for outdated dependencies and automatically update them using pnpm
191+
cd docs && $(NPM_RUNNER) run deps:update
192+
.PHONY: docs-deps-update

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ The full documentation for the package is available at [https://laravel-cycle-or
4949

5050
<br>
5151

52+
53+
## 🧩 Compatibility Map
54+
55+
| Laravel | Cycle ORM Adapter | Cycle ORM |
56+
|---------|-------------------|-----------|
57+
| 10.x | 4.x | 2.x |
58+
| 11.x | 5.x (Planned) | 2.x |
59+
60+
<br>
61+
5262
## 🤝 Contributing
5363

5464
Contributions are welcome!

docs/.ncurc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# npm-check-updates configuration used by yarn deps:check && yarn deps:update
3+
# convenience scripts.
4+
# @link https://github.com/raineorshine/npm-check-updates
5+
6+
# Add here exclusions on packages if any
7+
reject: []

docs/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
8-
"start": "next start"
8+
"start": "next start",
9+
"deps:update": "pnpm dlx npm-check-updates --configFileName .ncurc.yml -u --deep --mergeConfig && pnpm install"
910
},
1011
"repository": {
1112
"type": "git",
@@ -18,7 +19,8 @@
1819
},
1920
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
2021
"dependencies": {
21-
"next": "^14.0.0",
22+
"@vercel/analytics": "^1.2.2",
23+
"next": "^14.1.3",
2224
"nextra": "latest",
2325
"nextra-theme-docs": "latest",
2426
"react": "^18.2.0",
@@ -29,6 +31,6 @@
2931
"autoprefixer": "^10.4.18",
3032
"postcss": "^8.4.35",
3133
"tailwindcss": "^3.4.1",
32-
"typescript": "^5.0.0"
34+
"typescript": "^5.4.2"
3335
}
3436
}

docs/pages/_app.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Analytics } from '@vercel/analytics/react'
2+
import type { AppProps } from 'next/app'
3+
import type { ReactElement } from 'react'
4+
5+
import '../style.css'
6+
7+
function Nextra({ Component, pageProps }: AppProps): ReactElement {
8+
return (
9+
<>
10+
<Component {...pageProps} />
11+
<Analytics />
12+
</>
13+
)
14+
}
15+
16+
export default Nextra

docs/pages/contributing.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,32 @@ This leads to more readable messages that are easy to follow when looking throug
4949
- **chore** — Other changes that don't modify src or test files
5050
- **security** — A code change that fixes a security issue
5151

52+
## 🧪 Running Tests
53+
54+
### → PHPUnit Tests
55+
56+
To run phpunit (pest) tests, run the following command:
57+
58+
```bash
59+
$ make test
60+
```
61+
62+
### → Static Analysis
63+
64+
Run Code quality checks using [PHPStan](https://phpstan.org):
65+
66+
```bash
67+
$ make lint-stan
68+
```
69+
70+
### → Coding Standards Fixing
71+
72+
Fix code using [The PHP Coding Standards Fixer](https://github.com/wayofdev/php-cs-fixer-config) to follow our standards:
73+
74+
```bash
75+
$ make lint-php
76+
```
77+
5278
## 🔓 Security Vulnerabilities
5379

5480
If you discover a security vulnerability within this package, please send an e-mail to WayOfDev via the@wayof.dev. All security vulnerabilities will be promptly addressed.

docs/pages/installation.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,21 @@ Before you begin, ensure your development environment meets the following requir
99
- **PHP Version:** 8.2 or higher
1010
- **Laravel:** 10.x or higher
1111

12+
## 🧩 Compatibility Map
13+
14+
| Laravel | Cycle ORM Adapter | Cycle ORM |
15+
|---------|-------------------|-----------|
16+
| 10.x | 4.x | 2.x |
17+
| 11.x | 5.x (Planned) | 2.x |
18+
19+
1220
## 🚀 Quick Start
1321

1422
Installing the Laravel Cycle ORM Adapter is straightforward with Composer. Follow the steps below to add the adapter to your Laravel project.
1523

16-
### Step 1: Install the Adapter
24+
<div className="steps-container">
25+
26+
### Step: Install the Adapter
1727

1828
For the core functionality, run the following Composer command in your terminal:
1929

@@ -23,7 +33,7 @@ $ composer req wayofdev/laravel-cycle-orm-adapter
2333

2434
This command installs the wayofdev/laravel-cycle-orm-adapter package, integrating Cycle ORM into your Laravel application.
2535

26-
### Step 2: Publish Configuration
36+
### Step: Publish Configuration
2737

2838
After installing the package, publish the configuration file using the `vendor:publish` command:
2939

@@ -32,6 +42,8 @@ $ php artisan vendor:publish \
3242
--provider="WayOfDev\Cycle\Bridge\Laravel\Providers\CycleServiceProvider"
3343
```
3444

45+
</div>
46+
3547
## 🏭 Database Factories (Optional)
3648

3749
If you need support for [Eloquent-like Factories](https://laravel.com/docs/10.x/eloquent-factories), install the following package:

0 commit comments

Comments
 (0)