Download the PHP package radnan/rdn-require-js without Composer

On this page you can find all versions of the php package radnan/rdn-require-js. 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 rdn-require-js

RdnRequireJS

The RdnRequireJS ZF2 module integrates the RequireJS library into your project.

How to install

  1. Use composer to require the radnan/rdn-require-js package:

    $ composer require radnan/rdn-require-js:1.*
  2. Activate the module by including it in your application.config.php file:


The view helper will include the RequireJS library along with the requested modules as inline scripts.

### Multiple dependencies

You can call the view helper multiple times and it will keep appending the module dependencies. You can also provide an array to include multiple deps at a time:

~~~php
/** @var Zend\View\Renderer\PhpRenderer $this */

Code completion

If you'd like to have code completion for this helper, include the following in your PhpRenderer class:

namespace App\View\Renderer;

use Zend\View\Renderer\PhpRenderer as ZendPhpRenderer;

/**
 * @method requireJS(\string $dependencies = array())
 */
class PhpRenderer extends ZendPhpRenderer
{
}

Then, simply type hint the $this variable to this class in your view templates.

Library

The RequireJS library is, by default, included from cdnjs. You can configure this using the rdn_require_js.library option:

<?php

return array(
    'rdn_require_js' => array(
        'library' => '/path/to/local/require.js',
    ),
);

This path should be relative to your project's base path. The view helper will use the basePath() view helper to resolve the full path.

Configuration

You can manage the default requireJS configuration using the rdn_require_js.config option:

<?php

return array(
    'rdn_require_js' => array(
        'config' => array(
            'baseUrl' => '/modules',

            'paths' => array(
                'App' => 'app/js',
            ),

            'packages' => array(
                'App',
            ),
        ),
    ),
);

RequireJS config documentation


All versions of rdn-require-js with dependencies

PHP Build Version
Package Version
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 radnan/rdn-require-js contains the following files

Loading the files please wait ....