Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 488 Bytes

README.md

File metadata and controls

23 lines (20 loc) · 488 Bytes

[build-your-own] scriptjs

Inspired from https://github.com/ded/script.js

Exhaustive list of ways to use $script.js

// execute finally
$script(['foo.js', 'bar.js', 'test.js'], 'bundle')
$script.ready('bundle', function() {
  // foo.js & bar.js & test.js are ready
})

// execute accordingly
$script('foo.js', 'foo')
$script('bar.js', 'bar')
$script
  .ready('foo', function() {
    // foo.js is ready
  })
  .ready('bar', function() {
    // bar.js is ready
  })