Using almond with grunt-contrib-requirejs
问题 I'm trying to set up a gruntfile that utilizes requirejs and almond. The docs suggest it should be really easy, and following their lead, I tried: requirejs: { compile: { options: { baseUrl: "tmp", mainConfigFile: "tmp/main.js", name: "../bower_components/almond/almond", out: "tmp/<%= pkg.name %>.js" } } } Unfortunately, this approach compiles almond.js rather than my actual source. Am I getting something wrong? How do I automate almond along with requirejs? 回答1: The trick is to use include: