Download the PHP package octris/assets without Composer

On this page you can find all versions of the php package octris/assets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package assets

Assets

This is a simple assets manager for the octris php framework to make it possible to install additional modules containing Javascript, Css, Images etc. using composer. The assets manager acts as composer plugin and hooks into installation and updating commands. It tries to install new assets, update existing assets and remove no longer needed assets.

Configuration

The assets manager needs configuration in the composer.json file of the main package as well as the sub-package containing assets. This is done by defining an octris/assets namespace inside the extra part of composer.json.

Sub-package

Define as many sources as you want. The following example maps directories inside the sub-package to source-keys:

js => /libsjs
css => /styles

The directories have to be defined as relative to the root directory of the sub-package.

...
"extra": {
    "octris/assets": {
        "source": {
            "js": "libsjs",
            "css": "styles"
        }
    }
},
...

Main package

In the main package the source-keys can be mapped to (target) directories, in the main package. The directories have to be defined as relative to the root directory of the main package. The assets manager will create necessary directories when it runs.

"extra": {
    "octris/assets": {
        "target": {
            "js": "vendor_assets/js",
            "css": "vendor_assets/css",
            "img": "host/vendor_assets"
        }
    }
},

The asset source directories will be symlinked into the target directories.

As example, if the name of the sub-package would be octris/assetsdemo, the following symlinks would be created in the main-package for the above configuration:

MAIN_PKG_ROOT/vendor_assets/css/octris/assetsdemo -> MAIN_PKG_ROOT/vendor/octris/assetsdemo/styles
MAIN_PKG_ROOT/vendor_assets/js/octris/assetsdemo -> MAIN_PKG_ROOT/vendor/octris/assetsdemo/libsjs

Application configuration

To make it possible to manage assets with the template compiler of the octris php framework, additional configuration might be required. Open the file etc/global.php of your octris web project and configure the additional paths for the template engine:

The new assets can be accessed in the template by specifying the configured additional root paths.

Example:

<script src="/vendor_js/octris/assetsdemo/foo.js"></script>

All versions of assets with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
composer-plugin-api Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package octris/assets contains the following files

Loading the files please wait ...