Merge pull request #227 from afrjorge/require-js

cherry-pick [CDF-271] [CDF-270]