Download the PHP package modbase/asset-manager without Composer

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

Note: this project has been discontinued in favor of Elixir

Asset Manager

This is a little helper package for Laravel to use in combination with e.g. Gulp.

The advantage of this package is that it automatically handles versioned assets. With versioned assets, you can benefit from cache busting when an asset changes. This way your clients will always use the correct assets and not an old cached version.

For example the gulpfile.js below will produce a public/css/styles-{hash}.css and public/js/scripts-{hash}.js file where {hash} is the MD5 hash of the built file.

By using the Asset facade, you'll be able to include these assets without having to take care of those hashes.

For example Asset::scripts('frontend') would result in <script scr="public/js/scripts-627d37eb.js"></script>.

Installation

  1. Add "modbase/asset-manager": "0.1.*" to your composer.json file.
  2. Run composer update
  3. Add 'Modbase\AssetManager\AssetManagerServiceProvider' to your service providers in app/config/app.php.

Example gulpfile.js

Laravel Facade

Use this in your views: Asset::styles('frontend') and Asset::scripts('frontend').

The arguments of the styles() and scripts() methods correspond to the bundleName prefix you've given in the gulpfile.js. In the example above, it was frontend. Always end the bundleName with .scripts or .styles so that the AssetManager knows what to fetch.

Example workflow

  1. Use the above example gulpfile.js and update whatever you want, but be careful with the bundleName option!
  2. In your master.blade.php (assuming you're using the awesome Blade template engine and have a master layout) add {{ Asset::styles('frontend') }} to your head section. Add {{ Asset::scripts('frontend') }} at the bottom of your HTML (you should put your JavaScript at the bottom, just before the closing body tag to speed up loading).
  3. Add your assets to app/assets/css and app/assets/js (according to the gulpfile.js paths).
  4. Run gulp or gulp css or gulp js everytime you update your assets (or simply use a gulp watch).
  5. Enjoy!

All versions of asset-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
illuminate/support Version 4.1.*
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 modbase/asset-manager contains the following files

Loading the files please wait ....