Download the PHP package ecxod/symlink without Composer
On this page you can find all versions of the php package ecxod/symlink. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ecxod/symlink
More information about ecxod/symlink
Files in ecxod/symlink
Informations about the package symlink
Ecxod\Symlink\symlink
Let us assume we have the following package.json
file, which installs the packages jquery
and prismjs
into the node_modules
folder.
cat package.json
In addition, we have a composer.json
file that contains the following require
section, which installs the required packages sentry/sentry
, vlucas/phpdotenv
, twbs/bootstrap
, and twbs/bootstrap-icons
into the vendor
folder.
cat composer.json
We need to determine which folders inside the vendor
and node_modules
directories must be exposed to the internet. This can be done in two ways: by copying them to the public
folder, which is suboptimal because files in the exposed folders sometimes depend on other files within their respective modules, or by creating a symbolic link.
tree -d /vendor
In the case of the node_modules
folder, the situation is similar, and we need to identify which folders must be exposed to the internet. For jquery
, the developer has excellently designed a dist
folder that is meant to be exposed, but this is not always the case. prismjs
is one of those chaotic projects where the files that need to be exposed are scattered throughout the module folder. In such cases, we recommend exposing the entire module folder to the internet.
tree -d /node_modules
IMPORTANT
- Not all folders inside the
vendor
andnode_modules
directories need to be linked to thepublic
folder. Please carefully read the README files of your required libraries. - It would be ideal if library developers named the folders intended for public exposure something like
dist
, which would allow us to create links fully automatically. Until then, this decision is up to you.
In this context, we have developed a library that creates the necessary symlinks from the vendor
and node_modules
folders to the public
folder as the web server user (e.g., www-data
). This detail is important because the web server must be able to follow the symlinks to the library folders and read the files there.
When you first run the library, it creates and continuously updates a file called symlink-example.json
, which serves as a template for creating a symlink.json
file used by the library to generate the necessary links for your project.
cat symlink-example.json
If you are familiar with the JSON file structure, all you need to know is that the desired link is nested in the JSON as an JSON like: { "source" : "destination" }
, where the source is the library folder and the destination is the public folder. If you remove the array, empty it, or replace it with false
, the link will be removed the next time the library runs.
cat symlink.json
All versions of symlink with dependencies
sentry/sentry Version ^4.8
vlucas/phpdotenv Version ^5.6
ecxod/funktionen Version ^1.0
twbs/bootstrap Version ^5.3
twbs/bootstrap-icons Version ^1.13