You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/devlink/README.md
+38-12Lines changed: 38 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ It is used to link the packages from the `moox` monorepo into a project. It runs
7
7
## Installation
8
8
9
9
```bash
10
+
cp composer.json.example composer.json
11
+
cp .env.example .env
10
12
composer require moox/devlink
11
13
php artisan vendor:publish --tag="devlink-config"
12
14
```
@@ -32,49 +34,73 @@ packages/*
32
34
!packages/**/
33
35
# Ensure empty directories can be committed
34
36
!packages/*/.gitkeep
37
+
# Ignore all files in packages-linked/ (for Windows)
38
+
packages-linked/*
35
39
```
36
40
37
41
## Configuration
38
42
39
43
The configuration is done in the `config/devlink.php` file.
40
44
41
45
```php
42
-
'base_paths' => [
43
-
// 'path/to/base/path',
44
-
],
45
46
46
-
'packages' => [
47
-
// 'package-name',
48
-
],
47
+
'packages_path' => 'packages',
48
+
49
+
'base_paths' => [
50
+
base_path('../moox/packages'),
51
+
],
52
+
53
+
'packages' => [
54
+
'moox/tag',
55
+
],
56
+
49
57
```
50
58
51
59
## Command
52
60
53
61
The devlink command will create a `packages` directory in the root of the project and symlink the packages from the configured base paths.
54
62
55
63
```bash
56
-
php artisan moox:devlink
64
+
65
+
php artisan moox:devlink
66
+
57
67
```
58
68
59
69
It will also update the `composer.json` file to include the packages in the `require` section and the `repositories` section.
60
70
61
71
Finally, it will run `composer update`.
62
72
63
-
You can have local packages mixed with the symlinked packages in your `/packages` folder.
64
-
65
-

66
-
67
73
### Changing branches
68
74
69
75
If you need to change the branches for ANY of the involved repositories, you just need to run the command again, it will automatically update the symlinks for the current branch.
70
76
71
77
```bash
72
-
php artisan moox:devlink
78
+
79
+
php artisan moox:devlink
80
+
73
81
```
74
82
75
83
> ⚠️ **Important**
76
84
> If you forget to run the command, when CHANGING BRANCHES ON ANY OF THE REPOS, you will surely run into a 500 error, that drives you nuts.
77
85
86
+
## Mac
87
+
88
+
Mac works out of the box. You can have local packages mixed with the symlinked packages in your `/packages` folder.
89
+
90
+

91
+
92
+
## Windows
93
+
94
+
On Windows there are most probably some issues with the symlinks. If you run into issues, you can either globally or project-wise disable the symlinks or do the following:
95
+
96
+
```php
97
+
98
+
'packages_path' => 'packages-linked',
99
+
100
+
```
101
+
102
+
Devlink will then link the packages into the `packages-linked` folder.
103
+
78
104
## Security Vulnerabilities
79
105
80
106
Please review [our security policy](https://github.com/mooxphp/moox/security/policy) on how to report security vulnerabilities.
0 commit comments