refactor(demo): rework the codebase to use r.js via npm