19 declare(strict_types=1);
    35         protected string $source
    37         if (!preg_match(self::REGEXP_SOURCE, $this->source)) {
    38             throw new \InvalidArgumentException(
    39                 "'{$this->source}' is not a valid source path for a public asset."    46         return "node_modules/{$this->source}";
    51         $source = explode(
"/", $this->source);
    52         if (str_ends_with($this->source, 
".js")) {
    55         if (str_ends_with($this->source, 
".css")) {
    58         throw new \LogicException(
"Don't know where to put {$this->source}");
 
getTarget()
The new path of relative to the ILIAS public directory. 
 
getSource()
The path of asset relative to the ILIAS base directory. 
 
An public asset is a file or folder that should be served via the web. 
 
__construct(protected string $source)
 
Some distributable file created by npm.