PHPackages                             ecxod/symlink - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ecxod/symlink

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ecxod/symlink
=============

Langweilige Funktionen die man immer braucht

1.0.24(9mo ago)159MITPHPPHP ^7.2|^7.4|^8.0|^8.2CI passing

Since Jul 30Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/ecxod/symlink)[ Packagist](https://packagist.org/packages/ecxod/symlink)[ RSS](/packages/ecxod-symlink/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (5)Versions (25)Used By (0)

Ecxod\\Symlink\\symlink
=======================

[](#ecxodsymlinksymlink)

```
php composer.phar require twbs/bootstrap
php composer.phar require twbs/bootstrap-icons
php composer.phar require vlucas/phpdotenv
npm i jquery
npm i mathjax
npm i prismjs
npm i popperjs
npm i semantic-ui
```

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**

```
{
  "dependencies": {
    "jquery": "^3.7.1",
    "prismjs": "^1.29.0"
  }
}
```

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**

```
[...]
"require": {
    "php": "^7.2|^7.4|^8.0|^8.2",
    "sentry/sentry": "^4.8",
    "vlucas/phpdotenv": "^5.6",
    "twbs/bootstrap": "^5.3",
    "twbs/bootstrap-icons": "^1.13"
},
[...]
```

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

[](#tree--d-vendor)

```
vendor
    ├── composer
    [...]
    ├── sentry
    │   └── sentry
    ├── twbs
    │   ├── bootstrap
    │   │   └── dist
