Download the PHP package instaclick/require-js-bundle without Composer

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

master: Build Status 1.0: Build Status

HearsayRequireJSBundle

Overview

This bundle provides integration of the RequireJS library into Symfony2.

Installation

1. Using Composer (recommended)

To install HearsayRequireJSBundle with Composer just add the following to your composer.json file:

Note that the master branch is under development and unstable yet. If you want to use stable version then specify the 1.0.* version. However, remember that the 1.0 branch no longer provides new features, only bug fixes.

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:

Configuration

This bundle configured under the hearsay_require_js key in your application configuration. This includes settings related to paths, shim, optimization, and more.

_require_jssrc

type: string default: //cdnjs.cloudflare.com/ajax/libs/require.js/2.1.8/require.min.js

This is a string that represents the template name which will render the RequireJS src or an URL to the RequireJS.

_initializetemplate

type: string default: HearsayRequireJSBundle::initialize.html.twig

This is a string that represents the template name which will render the RequireJS initialization output. You can pass into this template any extra options.

_baseurl

type: string default: js required

This is a string that represents the base URL where assets are served, relative to the website root directory. This URL also will exposed as an empty namespace.

_basedir

type: string default: null

This is a string that represents the base URL for the r.js optimizer, that is generally actually a filesystem path.

paths

type: array default: null

This is a prototype that represents an array of paths. Each path:

shim

type: array default: null

This is a prototype that represents an array of shim, corresponds to the RequireJS shim config.

options

type: array default: null

An array of key-value pairs to pass to the RequireJS. The value can have variable type.

optimizer

type: array default: null

This block includes the r.js optimizer configuration options.

path

type: string default: null

This is a string that represents the path to the r.js optimizer.

_hide_unoptimizedassets

type: boolean default: false

This determines whether the r.js optimizer should suppress unoptimized files.

exclude

type: array default: []

An array of module names to exclude from the build profile.

options

type: array default: null

An array of key-value pairs to pass to the r.js optimizer. The value can have variable type.

timeout

type: integer default: 60

This determines the node.js process timeout, in seconds.

Full Default Configuration

Usage

Just output the RequireJS initialization and load files normally:

Alternately, you can specify a file to be required immediately via the data-main attribute:

If you need to do anything fancy with the configuration, you can do so manually by modifying the default configuration, and suppressing config output when initializing RequireJS:

To make global changes to the configuration/initialization output, you can specify an initialization template in your configuration:

To use this bundle with CoffeeScript, you can specify a path that contains .coffee scripts (means a directory). The scripts will renamed to .js scripts.

Note that the r.js optimizer cannot optimize .coffee scripts. However, you can apply the Assetic filter to this scripts by the file extension.

Optimization

This bundle provides the Assetic filter to create minified Javascript files using by r.js optimizer. This also inlines any module definitions required by the file being optimized. You need to provide a path to the r.js optimizer in your configuration to use the filter:

You can then use it like any other filter; for example, to optimize only in production:

Note that your configured path definitions will be incorporated into the optimizer filter, including the exclusion of external dependencies from the built profile's file.

If you wish to prevent unoptimized assets from being served (in e.g. production), you can suppress them:

If you're doing this, be sure that all the modules you need are bundled into your optimized assets (i.e. you're not accessing any modules by dynamic name, or if you are, then you're explicitly including those modules via optimizer options), otherwise you may see certain assets available in development, but not in production.

License

This bundle is released under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE

All versions of require-js-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
symfony/finder Version >=2.0
symfony/yaml Version >=2.0
kriswallsmith/assetic Version >= 1.0
symfony/framework-bundle Version >=2.0.9
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 instaclick/require-js-bundle contains the following files

Loading the files please wait ....