tonydewan / carabiner Goto Github PK
View Code? Open in Web Editor NEWJS/CSS Asset management library for CodeIgniter
JS/CSS Asset management library for CodeIgniter
right now in carabiner we can define just one directory for js and css assets, can we define multiple directories for the assets like 2 directories has different scripts
public
js - css
private or module specific
js - css
According to the documentation the following format should work:
$this->carabiner->css('home.css', 'screen', 'home.css', FALSE );
I've also tried:
$this->carabiner->css('home.css', 'screen', '', FALSE );
The other files added, which are combined, work and output properly. This particular file is linked as being in the /cache/ directory but no such file exists.
I believe a check should be added to prevent generating HTML references for empty paths, for example:
$css = array('');
$this->carabiner->css($css);
$this->carabiner->display('css');
will output a <link>
to the base CSS directory
When we combine two javascript files that do not end with a semi-colon, a javascript error is raised.
It can happen when libraries like jQuery are used.
Here is a sample.
$(function(){ /// My code})
When using that statement in a single file no error is raised, because the semi-colon (;) is not required, it's only strongly advised.
If we combine another file to this sample an error can be raised.
The fix is easy :
in libraries/carabiner.php at the line 964 and 970, replace
$file_data .= $this->_minify( $flag, $file['dev'] ) . "\n";
and
$file_data .= $this->_get_contents( $r ) ."\n";
by
$file_data .= $this->_minify( $flag, $file['dev'] ) . ";\n";
and
$file_data .= $this->_get_contents( $r ) .";\n";
In the usage guidelines the optional boolean "minify" parameter is not explained and there are no examples of its usage.
Hi,
There is an option for load assets from module? for example:
the css path is APPPATH.'modules'
and we can add modules asset path next like test_module/assets/css/test.css
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.