Skip to content

tacoss/oh-my-deps

Repository files navigation

Oh my deps!

TravisCI NPM Bower

We want to do this:

oh.define 'dummy', ->
  (data) ->
    console.log 'DUMMY OUTPUT', data

oh.define 'moment', '/vendor/moment/moment.js'
oh.define 'moment/locale/es', '/vendor/moment/locale/es.js'

and then:

oh.require ['dummy', 'moment', 'moment/locale/es'], (dummy) ->
  dummy moment('19870610', 'YYYYMMDD').fromNow()

Consider the following constraints:

  • Calling oh.require() will load all scripts in sequence.
  • This script loader has no support for AMD/UMD.
  • This is not an RequireJS implementation.
  • Under development. ∞

Since 0.0.4 all callbacks are invoked after DOMContentLoaded is done.

OMD was designed for working with existing libraries in the Bower registry.

Most of them are in their own namespaces or their globals are not enough harmful.

About

Another script loader for the browser

Resources

Stars

Watchers

Forks

Packages

No packages published