GithubHelp home page GithubHelp logo

codeigniter-assetloader's People

Contributors

ilatif avatar sn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ilatif

codeigniter-assetloader's Issues

Allow developers to render CSS and JavaScript tags at different places

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.

Todo: Ability to specify link and script tag attributes like defer & async

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.

Implement flexible generation of path

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.