oh-my-deps

v0.0.4
Another script loader for the browser

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.

npm i oh-my-deps

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 10/8/2015

Downloads

Maintainers