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
+41-21Lines changed: 41 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,10 @@
1
1
# Moox Devlink
2
2
3
-
This package is only for internal use.
4
-
5
-
It is used to link the packages from the `moox` monorepo into a project. It runs on MacOS, Linux and Windows.
3
+
Moox Devlink is used to link packages a monorepo into any project and to deploy a production-ready composer.json. That allows us to develop Moox packages in any project. It runs on MacOS and Linux, Windows with special configuration.
6
4
7
5
## Installation
8
6
9
7
```bash
10
-
cp .env.example .env
11
8
composer require moox/devlink
12
9
php artisan vendor:publish --tag="devlink-config"
13
10
```
@@ -33,10 +30,18 @@ packages/*
33
30
34
31
```
35
32
36
-
2. Configure your paths and packages in the `config/devlink.php` file and the `.env` file, if needed (Windows users for example).
33
+
2. Configure your paths and packages in the `config/devlink.php` file and change the package path in the `.env` file, if needed (Windows users should set the `DEVLINK_PACKAGES_PATH` variable to `packageslocal`).
34
+
35
+
3. When running `devlink:status`:
36
+
37
+
- Lists all packages that are currently devlinked
38
+
- Lists all packages that are configured but not devlinked
39
+
- Lists all packages that are not configured, but devlinked
40
+
- Shows the configuration and the deploy status of each package
37
41
38
-
3. When running `devlink:link`:
42
+
4. When running `devlink:link`:
39
43
44
+
- Creates the packages folder, if it does not exist
40
45
- Creates backup of original composer.json → composer.json.original
41
46
- Creates symlinks for all configured packages
42
47
- Updates composer.json with development configuration
@@ -45,15 +50,31 @@ packages/*
45
50
- Asks to run `php artisan optimize:clear`
46
51
- Asks to run `php artisan queue:restart`
47
52
48
-
4. When running `devlink:deploy`:
53
+
5. When running `devlink:unlink`:
54
+
55
+
- Removes all symlinks
56
+
- Deletes the packages folder, if empty
57
+
- Creates a backup of composer.json to composer.json-backup
58
+
- Restores original composer.json from composer.json-original
59
+
- Asks to run `composer install`
60
+
- Asks to run `php artisan optimize:clear`
61
+
- Asks to run `php artisan queue:restart`
62
+
63
+
6. When running `devlink:deploy`:
49
64
50
65
- Removes all symlinks
51
66
- Deletes the packages folder, if empty
67
+
- Creates a backup of composer.json to composer.json-backup
52
68
- Restores production-ready composer.json from composer.json-deploy
69
+
- Asks to run `composer install`
70
+
- Asks to run `php artisan optimize:clear`
71
+
- Asks to run `php artisan queue:restart`
72
+
73
+
7. CI Safety Net - `deploy.sh`:
53
74
54
-
5. CI Safety Net - `deploy.sh`:
55
75
- If composer.json-deploy exists in the repository:
56
-
- The script will restore it as composer.json
76
+
- the script will restore it as composer.json
77
+
- rename composer.json-original to composer.json-backup
57
78
- Commit and push the change in GH action
58
79
- This ensures no development configuration reaches production
59
80
@@ -74,24 +95,23 @@ Mac works out of the box. You can have local packages mixed with the symlinked p
74
95
75
96
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:
76
97
77
-
```php
98
+
```env
99
+
DEVLINK_PACKAGES_PATH=packages-linked
100
+
```
78
101
79
-
'packages_path' => 'packages-linked',
102
+
Devlink will then link the packages into the `packages-linked` folder instead of mixing them into packages.
80
103
81
-
```
104
+
## Classes
82
105
83
-
Devlink will then link the packages into the `packages-linked` folder.
106
+
Please see the [CLASSES.md](./CLASSES.md) file for a quick class overview.
84
107
85
108
## Roadmap
86
109
87
-
-[ ] Test on Mac
88
-
-[ ] Test on Windows
89
-
-[ ] Test Deployment on Mac
90
-
-[ ] Test Deployment on Windows
91
-
-[ ] Implement automatic Deployment
92
-
-[ ] Implement all 3 types of packages
93
-
-[ ] If package is a symlink itself, ...?
94
-
-[ ] If package is in multiple base paths...?
110
+
Please see the [ROADMAP.md](./ROADMAP.md) file for what is planned.
111
+
112
+
## Changelog
113
+
114
+
Please see the [CHANGELOG.md](./CHANGELOG.md) file for what has changed.
0 commit comments