Skip to content

Third-party scripts (Feature) #5

@bengourley

Description

@bengourley

It would be nice to have a feature in compact that lets you reference third party scripts.. e.g jQuery on Google's CDN, Google Maps API, various share widgets (Twitter, +1, Facebook).

e.g:

compact.addNamespace('find-us')
    .addThirdPartyJs('http://maps.google.com/maps/api/js?sensor=true')
    .addJs('/js/my-map.js');

Output:

<script src='http://maps.google.com/maps/api/js?sensor=true'></script>
<script src="/js/compact/find-us.js"></script>

Similar functionality is easily achievable with Jade template inheritance, but I think it would be better if all of the frontend JS was organised in one place. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions