Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

use local libraries for local testing #64

Open
espinielli opened this issue Jul 8, 2015 · 0 comments
Open

use local libraries for local testing #64

espinielli opened this issue Jul 8, 2015 · 0 comments
Assignees

Comments

@espinielli
Copy link
Contributor

When testing locally use local libraries instead of going to CDN.
PRO's

  • can be work when offline

CON's

  • awful/difficult management of libraries and relevant versions and alignment of URLs.
    Maybe we need

    • a placeholder for the list of libs/version from where to build the <script> tags
      something like
     libs: [
        [<name>, <version #>, <CDN URL>, <local URL>],
        [jquery, 2.0.3, https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js, js/jquery-2.0.3.min.js],
        ...
     ]

    And then build the HTML tamplate with something like:

    {% if site.dev %} 
      {% for lib in site.libs %}
         <script src="<get CDN URL>"></script>
      {% endfor %}
    {% else %}
       <script src="<get local URL>"></script>
    {% endif %}
@espinielli espinielli self-assigned this Jul 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant