Download the PHP package vendethiel/sprockets-php without Composer

On this page you can find all versions of the php package vendethiel/sprockets-php. 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 sprockets-php

Sprockets-PHP

What is Sprockets-PHP

Sprockets-PHP is a port of Sprockets, the well-known Asset Manager for Rails. Sprockets-PHP allows you to manage your assets by taking care of preprocessors, dependencies, minification and caching. The Asset Pipeline will read your main file (usually "application.js" or "application.css"), read directives, and apply filters for all the files. This is an example usage

application.js

lib/form/index.js.coffee

/lib/form/base-input.js.coffee

lib/inputs/text.js.coffee

lib/inputs/password.js.ls

It's primarily meant to deal with JS and CSS but can as well be used for HTML (HAML, Twig, Slim...). You can add your own filters in a very flexible way (see below).

How can I use it ?!

You have to create an instance of Sprockets\Pipeline. The argument is the array of "base paths" from where the Pipeline has to search files.

If you want to call directly the Pipeline, you can then do $pipeline($asset_type). For example $pipeline('css');. The framework will load application.css in one of the base paths. This file must contain "directives", like Sprockets's one.

Asset Paths

The asset paths are divided by "modules" to be as flexible as it can :

You have 2 keys in each modules : the directories, which list directories where the Pipeline must search files, and prefixes, which will append the path for the extension to the directory (ie a js file will get javascripts/ appended to its paths).

For example, if we run $pipeline('js'), the pipeline will try to find the following files :

This example file, allowing to use a Rails-like javascripts/ directory for js file gracefully, also supports //= require jquery/jquery to find vendor/bower/jquery/jquery.js

Only the "meaningful" extension matters (using a whitelist).

Options

Here are the options and their default values :

Just pass them along in paths.

Caching

Something to note : even if you're not using Sprockets\Cache, the asset pipeline will keep a file list cache in your cache directory, to speed up path lookups.

Directive Syntax

There are three supported syntaxs at this moment.

Supported Directives

The directives disponibles are : require, require_directory, require_tree and depends_on

require

Requires a file directly, from the relative path OR one of the base path. You can also give a directory name, if this directory has a file named "index.$type" (here, "index.css") in. This directive supports bracket expansion.

require_directory

Requires each file of the directory. Not recursive.

require_tree

Recursively requires each file of the directory tree.

depends_on

Adds the file to the dependencies, even if the file isn't included. For example, in application.css

If this file change, the whole stylesheet (and the dependencies) will be recompiled (this is meant for inlining of some preprocessors).

Filters

The available filters are :

Languages :

JavaScript :

Stylesheet :

Html :

Adding filter is very easy (to create a .twig filter or a .md, for example). Just add it to the pipeline :

You must implement an interface like \Sprockets\Filter\Interface :

You can also inherit Sprockets\Filter\Base which gives you access to :

Running Tests

To run the tests you need to first install the dependencies. You do this via composer with the following command:

php composer.phar install

Once that is done you just need to run the "index.php" file in the test directory. The easiest way to do this is to use the built-in PHP webserver.

cd test
php -S localhost:5000

Then in your web browser visit:

http://localhost:5000/index.php

Alternatively you can just run the tests from the command line although the output will contain a few HTML tags:

cd test
php index.php

All versions of sprockets-php with dependencies

PHP Build Version
Package Version
Requires mthaml/mthaml Version 1.3.0
leafo/lessphp Version 0.4.0
richthegeek/phpsass Version 2012-06-27
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 vendethiel/sprockets-php contains the following files

Loading the files please wait ....