I suggest you ...

URL prefix

how about introducing prefix support?
if for example i had a cdn-)base-url like

'http://cdnjs.cloudflare.com/ajax/libs/headjs/';

and wanted to load multiple scripts prefixed by this base
i'd currently have to type out the full url for every single script.

i' thinking about sth like

<script>

head.ready('early', function(){...});

head.js(

'/path/to/locally/hosted/file.js',
{
// here goes the prefix
'http://cdnjs.cloudflare.com/ajax/libs/headjs/''; :
{
// as of this example leaf objects must have labels
// which is a good compromise i think
label1 : 'first.js',
early : 'second.js'
}
},
{
// with an array things get too fuzzy i think
// though non-labeled yet prefixed scripts
// could be supported
'another-url-prefix' : [
'first.js',
{
lable : 'second.js'
}
]
}
);

</script>

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    espretto shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base