wixel / codeigniter-assetloader Goto Github PK
View Code? Open in Web Editor NEWA CodeIgniter library to create an asset pipeline using a simple manifest file
License: MIT License
A CodeIgniter library to create an asset pipeline using a simple manifest file
License: MIT License
Presently there is no such method that allow developers to render CSS and JavaScript tags at different places. For some reason developers might want to insert CSS tags in HEAD
tag and JavaScript tags before closing body
tag. This library should provide this functionality out-of-the-box.
Presently for CSS and JavaScript tags, path is generated like <script src='/assets/js/application.js'></script>
. This path restrict browsers to fetch resources from root. Many a times during local development most developers don't create virtual-host and prefer to run web-apps under some directory in web-root which creates path like http://localhost/my_web_app
. Inserting /
before paths makes it difficult for those developers to use this library.
A clean way to achieve abstraction is to use CodeIgniter's built-in site_url
method to generate path for assets. This will create correct path in every case.
Hi,
Your library is super useful and awesome. I would like to contribute. I think for this todo item we should introduce a new syntax. For example:
js[] = ["src" => "js/vendor/modernizr-2.6.2.min.js", "attributes" => ["async" => true, "custom-attribute" => "custom-attribute-value"]];
This syntax will not add much complexity as PHP developers are already familiar with associative arrays. For other resources which don't require any extra attributes existing syntax i.e. js[] = "js/vendor/modernizr-2.6.2.min.js"
will work fine.
Please let me know what you think and I would love to contribute.
Thanks.
Presently if I mention same file multiple times in .ini
file then same tag for that file is getting inserted multiple times. Even if I mention same file multiple times under same environment it's tag should be inserted once.
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.