terabytesoftw / asset-fontawesome
Assets Font Awesome Free
Installs: 114
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: ^7.2.0
- npm-asset/fortawesome--fontawesome-free: ^5.6.3
- oomphinc/composer-installers-extender: ^1.1
- yiisoft/yii2: ^2.0.20
Requires (Dev)
- codeception/c3: 2.*
- codeception/codeception: ^3.0
- codeception/specify: *
- codeception/verify: *
- dms/phpunit-arraysubset-asserts: ^0.1.0
- hiqdev/composer-config-plugin: ^1.0@dev
- monolog/monolog: *
- yiisoft/yii2-debug: ~2.1.0
- yiisoft/yii2-gii: ~2.1.0
This package is auto-updated.
Last update: 2024-12-06 09:08:56 UTC
README
Asset FontAwesome Free
DIRECTORY STRUCTURE:
config/ contains application configurations
node_modules/ contains dependency assets
src/ contains source files
tests/ contains tests codeception for the web application
vendor/ contains dependent 3rd-party packages
REQUIREMENTS:
- The minimum requirement by this project template that your Web server supports:
- PHP 7.2 or higher.
INSTALLATION:
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
You can then install this extension using the following command composer:
composer require terabytesoftw/asset-fontawesome '^1.0@dev'
or add composer.json:
"terabytesoftw/asset-fontawesome":"^1.0@dev"
ASSETS FONTAWESOME:
/**
* CONTENT DELIVERY NETWORK CSS
* NAMESPACE: terabytesoft\assets\fontawesome\cdn
*/
- CdnAllCssAsset, CdnBrandCssAsset, CdnRegularCssAsset, CdnSolidCssAsset
/**
* CONTENT DELIVERY NETWORK JS
* NAMESPACE: terabytesoft\assets\fontawesome\cdn
*/
- CdnAllJsAsset, CdnBrandJsAsset, CdnRegularJsAsset, CdnSolidJsAsset
/**
* DEVELOPER CSS
* NAMESPACE: terabytesoft\assets\fontawesome\dev
*/
- NpmAllCssAsset, NpmBrandCssAsset, NpmRegularCssAsset, NpmSolidCssAsset
/**
* DEVELOPER JS
* NAMESPACE: terabytesoft\assets\fontawesome\dev
*/
- NpmAllJsAsset, NpmBrandJsAsset, NpmRegularJsAsset, NpmSolidJsAsset
/**
* PRODUCTION CSS
* NAMESPACE: terabytesoft\assets\fontawesome\min
*/
- NpmAllMinCssAsset, NpmBrandMinCssAsset, NpmRegularMinCssAsset, NpmSolidMinCssAsset
/**
* PRODUCTION JS
* NAMESPACE: terabytesoft\assets\fontawesome\min
*/
- NpmAllMinJsAsset, NpmBrandMinJsAsset, NpmRegularMinJsAsset, NpmSolidMinJsAsset
USAGE:
<?php
// content delivery network
use terabytesoft\assets\fontawesome\cdn\CdnAllCssAsset;
CdnAllCssAsset::register($this);
echo \yii\helpers\Html::tag('i', '', ['class' => 'fas fa-user-alt fa-2x']);
<?php
// developer version
use terabytesoft\assets\fontawesome\dev\NpmAllJsAsset;
NpmAllJsAsset::register($this);
echo \yii\helpers\Html::tag('i', '', ['class' => 'fas fa-user-alt fa-2x']);
<?php
// minified version
use terabytesoft\assets\fontawesome\min\NpmAllMinCssAsset;
NpmAllMinCssAsset::register($this);
echo \yii\helpers\Html::tag('i', '', ['class' => 'fas fa-user-alt fa-2x']);
CHANGE VERSION CDN FONTAWESOME:
This extension uses composer-config-plugin, with which you can overwrite the original configuration of cdn asset fontawesome, and place your version of preference, for the changes to take effect remember to run composer du.
params.php
return [
// cdn css urls
'asset.fontawesome.cdn.css.all' => 'https://use.fontawesome.com/releases/v5.10.0-11/css/all.css',
'asset.fontawesome.cdn.css.brand' => 'https://use.fontawesome.com/releases/v5.10.0-11/css/brands.css',
'asset.fontawesome.cdn.css.fontawesome' => 'https://use.fontawesome.com/releases/v5.10.0-11/css/fontawesome.css',
'asset.fontawesome.cdn.css.regular' => 'https://use.fontawesome.com/releases/v5.10.0-11/css/regular.css',
'asset.fontawesome.cdn.css.solid' => 'https://use.fontawesome.com/releases/v5.10.0-11/css/solid.css',
// cdn js urls
'asset.fontawesome.cdn.js.all' => 'https://use.fontawesome.com/releases/v5.10.0-11/js/all.js',
'asset.fontawesome.cdn.js.brand' => 'https://use.fontawesome.com/releases/v5.10.0-11/js/brands.js',
'asset.fontawesome.cdn.js.fontawesome' => 'https://use.fontawesome.com/releases/v5.10.0-11/js/fontawesome.js',
'asset.fontawesome.cdn.js.regular' => 'https://use.fontawesome.com/releases/v5.10.0-11/js/regular.js',
'asset.fontawesome.cdn.js.solid' => 'https://use.fontawesome.com/releases/v5.10.0-11/js/solid.js',
// cdn css utilities
'asset.fontawesome.cdn.css.svg-with-js' => 'https://use.fontawesome.com/releases/v5.10.0-11/css/svg-with-js.css',
'asset.fontawesome.cdn.css.v4-shims' => 'https://use.fontawesome.com/releases/v5.10.0-11/css/v4-shims.css',
// cdn js utilities
'asset.fontawesome.cdn.js.v4-shims' => 'https://use.fontawesome.com/releases/v5.10.0-11/js/v4-shims.js',
];
RUN TESTS CODECEPTION:
// download all composer dependencies root project
$ composer update --prefer-dist -vvv
// run all tests with code coverage
$ vendor/bin/codecept run unit --coverage-xml
WEB SERVER SUPPORT:
- Apache.
- Nginx.
- OpenLiteSpeed.