Skip to content

Purecis/Helper.Asset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Helper.Asset Module

Special Module help you manage Assets in codeHive 3 Framework.

Installation :

you can simply install it from hive command line as :

hive install Helper.Asset

Asset helper need Special Directives to defined in index.html file allowing events to dispatched correctly in position.

<Asset load="defaults"></Asset>
<Asset load="style"></Asset>
<Asset load="definer"></Asset>
<Asset load="script"></Asset>
<Asset load="head"></Asset>

or one loader to load all

<asset load="defaults,style,definer,script,head"></asset>

Usage :

initialize Asset Helper Module

use App\Helper\Asset;
$asset = new Asset;

define javascript variables

$asset->jsDefine("angular.options.first", "SomeValue");
$asset->jsDefine("angular.options.secound", ["name" => "original name", "pass"=>"123456"]);
$asset->jsDefine("angular.options.secound.name", "updated name");

append to array and create path in js

// you can access from javascript as [codeHive.angular.plugins]
$asset->jsPush("angular.plugins", "PluginName");

define script or style

$asset->script("[email protected]");
$asset->style("[email protected]");

License

Copyright (c) 2013 - 2017, Purecis, Inc. All rights reserved.

This Module is part of codeHive framework and its open-sourced software licensed under the MIT license

About

Assets Management and Directives for codeHive 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages