Build base.js and ui.js with AMD.