静态html到wordpress JS插件问题

I am transforming my static html to a wordpress theme. Everything is going fine expect one little thingy.

My static html uses this script in the head

<script>
  // terrificjs bootstrap
  (function($) {
      $(document).ready(function() {
          var $page = $('body');
          var config = {
            dependencyPath: {
              plugin: 'javascripts/'
            }
          }
          var application = new Tc.Application($page, config);
          application.registerModules();
          application.start();
      });
  })(Tc.$);
</script>

I'm not sure what it does. I keep getting this error in my console.

Uncaught ReferenceError: Tc is not defined

I've tried something like this with url at the plugin: line

plugin: '<?php echo get_template_directory_uri() ?>/javascripts/'

But the error keeps occuring Anyone knows what this script is for and how to implement it in my wordpress theme? Thanks in advance :)

I found the issue! The TerrificJS Library was being loaded after the function.