Download the PHP package it-for-free/php-simple-assets without Composer

On this page you can find all versions of the php package it-for-free/php-simple-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 php-simple-assets

php-simple-assets

publish assets (js, css etc) from vendor, support dependencies (inspired by yii2 assets)

Установка (Install)

Установка с помощью composer:

(install via composer).

Использование (Usage)

it-for-free/php-simple-assets предоставляет два класса (it-for-free/php-simple-assets package supplies two classes):

Настройка SimpleAssetManager (ассета) (Configure Asset Manager)

Во время инициаллизации приложения (или до использования других возможностей данного пакета) установите путь к папке асстов (относительно корня сайта): (set base asset publish path relative to document root during your app init, or before any different usage of this package)

-- эта директория должна быть доступной для записи ($assetsPath dir should be writable)

Создание пакета расурсов (ассета) (Asset declaration)

Определите пакет унаследовавшись от SimpleAsset (define yoor new assets with js and html paths):

Также можно указать ассет с зависимостью от другого ассета, для этого заполните свойство-массив $needs полными именами классов ассетов, от которых зависит данный (You can also define dependencies from other packages by setting $needs array property):

Далее в любом месте кода, например в представлении зарегистрируем ассет (Then in any place in your code register any asset you need on page by call ::add()):

Это даст нам (We will get):

-- Как видно, SimpleAssetManager может выводить все зарегистрированные JS и CSS в нужном порядке. (As you can see SimpleAssetManager can print JS or Css like HTML resource tags)

javascript source maps

Вы можете добавлять пути к файлам source map (они должны заканчиваться на .map) в свойство public $js вашего класса-ассета.

(You can add paths to source map files (they should end with .map) in your asset class public $js array property.)

Тестирование

С помощью кодесепшн:

Связанные пакеты (Other related packages)

Смотрите компоненты SimpleMVC (Look at SimpleMVC components): https://github.com/it-for-free/SimpleMVC#%D0%BF%D0%BE%D0%BB%D0%B5%D0%B7%D0%BD%D1%8B%D0%B5-%D0%BA%D0%BE%D0%BC%D0%BF%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D1%8B

ToDo


All versions of php-simple-assets with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
it-for-free/rusphp Version v2.*
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 it-for-free/php-simple-assets contains the following files

Loading the files please wait ....