Add the included directories and files.

@param AssetInterface $asset_holder
760245
private function includeThis(AssetInterface $asset_holder)
    {

        // include the included directories
        $this->in($asset_holder->getIncludedDirectories());

        // include files with this extensions
        foreach ($asset_holder->getIncludedExtensions() as $extension) {
            $this->name('*'.$extension);
        }

        // include patterns
        foreach ($asset_holder->getIncludedPatterns() as $pattern) {
            $this->name($pattern);
        }

        // exclude ignored directories
        $this->exclude($asset_holder->getExcludedDirectories());
    }
1156223
protected function initializeAssetsVendorDir()
    {
        $path = $this->getRootPackageAssetsPath() . '/' . (
            $this->assets_vendor_dir ? str_replace($this->getRootPackageAssetsPath(), '', $this->assets_vendor_dir) : ''
        );
        $this->filesystem->ensureDirectoryExists($path);
        $this->assets_vendor_dir = realpath($path);
        return $this;
    }
1138055
private function publishAssets($register)
    {
        $build = $this->path . '/assets/build.php';
        if (!file_exists($build)) {
            return;
        }

        if (!$register) {
            DI::getInstance()->get('asset-manager')->remove(null, $this->plugin);
        }

        // update manifest
        $manifest = $this->getManifest('assets');
        /** @noinspection PhpIncludeInspection */
        $list = file_exists($manifest) ? include $manifest : [];
        if ($register) {
            // make absolute path to relative path
            $basePath = base_path();
            $basePathLength = strlen($basePath);
            /** @noinspection PhpIncludeInspection */
            $assets = include $build;
            foreach ($assets as $asset => $sources) {
                foreach ($sources as $i => $source) {
                    if (substr($source, 0, $basePathLength) == $basePath) {
                        $assets[$asset][$i] = substr($source, $basePathLength + 1);
                    }
                }
            }
            // insert asset build information
            /** @noinspection PhpIncludeInspection */
            $list[$this->plugin] = $assets;
        }
        else {
            // remove asset build information
            unset($list[$this->plugin]);
        }
        $this->saveArray($manifest, $list);

        if ($register) {
            DI::getInstance()->get('asset-manager')->publish(null, true, $this->plugin);
        }
    }
1241993
public function add (array $assets, ?callable $progress) : void
    {
        $fileTypeRegistry = $this->locator->get(FileTypeRegistry::class);
        $deferred = [];

        foreach ($assets as $asset)
        {
            if ($fileTypeRegistry->importDeferred($asset))
            {
                $deferred[] = $asset;
                continue;
            }

            $this->addAsset($asset);

            if (null !== $progress)
            {
                $progress();
            }
        }

        foreach ($deferred as $asset)
        {
            $this->addAsset($asset);

            if (null !== $progress)
            {
                $progress();
            }
        }
    }
1182543
protected function addingAssetUrl($assetUrl,$resources)
    {
        foreach ($resources as &$resource) {
            if (gettype($resource)=="string") {
                $resource = $assetUrl."/".$resource;
            } else if (gettype($resource)=="array") {
                $resource = $this->addingAssetUrl($assetUrl, $resource);
            }
        }
        return $resources;
    }
915832
public function createAction(Asset $asset): void
    {
        if ($this->persistenceManager->isNewObject($asset)) {
            $this->assetRepository->add($asset);
        }
        $this->addFlashMessage('assetHasBeenAdded', '', Message::SEVERITY_OK, [htmlspecialchars($asset->getLabel())]);
        $this->redirect('index');
    }
637676
private function prependRepositories(RootPackageInterface $root)
    {
        $json = $this->getJson();

        if (isset($json['repositories'])) {
            $repoManager  = $this->getComposer()->getRepositoryManager();
            $repositories = [];

            foreach ($json['repositories'] as $repoJson) {
                $this->addRepository($repoManager, $repositories, $repoJson);
            }

            /** @var \Composer\Package\RootPackageInterface $unwrapped */
            self::unwrapIfNeeded($root, 'setRepositories')
                ->setRepositories(array_merge($repositories, $root->getRepositories()));
        }
    }
456374
public function addAsset(Asset $asset): bool
    {
        if ($asset->getAssetCollections()->contains($this) === false) {
            $this->assets->add($asset);
            return true;
        }

        return false;
    }
758334
def asset_root
      File.expand_path(File.join(File.dirname(__FILE__),
                                 %w(.. .. ..),
                                 %w(assets aker form)))
    end
539095
public function setAssetCollections(Collection $assetCollections)
    {
        foreach ($this->assetCollections as $existingAssetCollection) {
            $existingAssetCollection->removeTag($this);
        }
        foreach ($assetCollections as $newAssetCollection) {
            $newAssetCollection->addTag($this);
        }
        foreach ($this->assetCollections as $assetCollection) {
            if (!$assetCollections->contains($assetCollection)) {
                $assetCollections->add($assetCollection);
            }
        }
        $this->assetCollections = $assetCollections;
    }
1281093
private function copyVendorAssets()
    {
        $modules = [];
        $moduleLoader = new Loader($this->di);
        $moduleLoader->dumpModulesFromVendor($modules);

        $publicAssetsDir = $this->getOption('d', APP_ROOT.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'assets');


        if ($modules) {
            foreach ($modules as $moduleName => $module) {
                $assetsDir = dirname($module['path']) . '/../assets';

                if (file_exists($assetsDir)) {
                    $this->putText("- " . $moduleName . "...");

                    $this->copyRecursive($assetsDir, $publicAssetsDir);
                }
            }
        }
    }
230636
public function addAsset($type, $assetName, $fileName, $dependencies = array())
    {
        if (!isset($this->assets[$type]) || !is_array($this->assets[$type])) {
            $this->assets[$type] = array();
        }
        
        $asset = new Asset(
            $type,
            $assetName,
            $this->buildSourceFilePath($fileName),
            $dependencies
        );
        
        $this->assets[$type][$assetName] = $asset;
        $this->saveAssets();
    }
1357216
public function addIfExists($file_path)
    {
        $_fp = $this->__template->findAsset($file_path);
        if ($_fp || \AssetsManager\Loader::isUrl($file_path)) {
            return $this->add($file_path);
        }
        return $this;
    }
1006665
public function loadFiles($assets)
    {
        foreach ($assets as $type => $item) {
            $addMethod = 'load' . ucfirst($type);

            if (method_exists($this, $addMethod)) {
                call_user_func_array([&$this, $addMethod], [$item]);
            }
        }
    }
23272
private function autoLoadAssets()
    {
        // Add in the CDN-typed assets
        foreach(config('assetprocessor.autoload.cdn', array()) as $asset)
        {
            // Add in the asset
            self::cdn($asset, $asset);
        }

        // Add in the local assets
        foreach(config('assetprocessor.autoload.local', array()) as $asset)
        {
            // Add in the asset
            self::add($asset, $asset);
        }        
    }
438126
protected function addAssetRepositoryToRootComposer()
    {
        $composer = json_decode(file_get_contents(base_path('composer.json')), true);

        $composer['repositories'][] = [
            'type' => 'path',
            'url' => './'.$this->relativeAssetPath(),
        ];

        file_put_contents(
            base_path('composer.json'),
            json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
        );
    }
908625
public function addAssets()
    {
        if ($this->enabled()) {

            // Only add assets if Page is HTML
            $page = $this->grav['page'];
            if ($page->templateFormat() !== 'html') {
                return $this;
            }

            /** @var Assets $assets */
            $assets = $this->grav['assets'];

            // Add jquery library
            $assets->add('jquery', 101);

            $this->renderer = $this->debugbar->getJavascriptRenderer();
            $this->renderer->setIncludeVendors(false);

            // Get the required CSS files
            list($css_files, $js_files) = $this->renderer->getAssets(null, JavascriptRenderer::RELATIVE_URL);
            foreach ((array)$css_files as $css) {
                $assets->addCss($css);
            }

            $assets->addCss('/system/assets/debugger.css');

            foreach ((array)$js_files as $js) {
                $assets->addJs($js);
            }
        }

        return $this;
    }