我设法使用了require.js,并且优化了我的项目。但是它生成3个JavaScript文件:
1。主文件
require.js config文件(html中引用的一个为 data-main )
2。require.js库
require.js。
的代码3。我的应用程序代码
是否可以将这3个JavaScript文件合并到一个文件中?
看一下grunt js项目,特定于:
grunt concat
和需要JS的插件:
https://github.com/asciidisco/grunt-requirejs