- 装备 tags:
The first step is to create a work directory for publishing your sources, say 'public', and also put your vendor scripts in 'src/libs' Setup your first Grunt task, copy:dev. The copy plugin is one of the most used plugin for copying files. This will copy your source code from src/ to public/, as well as your vendor scripts.
Then move your requirejs.config from html to your main.js. Require.js is able to read configuration after it loaded your entry script. This is of great helpful for optimized code.