This is class is heavily based on wordpress wp_enqueue_script / wp_enqueue_style