NBOCampbellToets / CampbellSoup

CampbellSoup, the web-based archive of Campbell test questions.
0 stars 1 forks source link

Use RequireJS plugin for CoffeeScript? #35

Open jgonggrijp opened 7 years ago

jgonggrijp commented 7 years ago

Currently the project employs a standalone Grunt task for compiling the CoffeeScript sources to JavaScript. For production, the JS sources are then optimized into a single file. I recently learned that this can alternatively be tackled using the require-cs AMD plugin. It dynamically compiles in the browser during development, but it can compile ahead of time for the optimized build, so it does not introduce additional dependencies in production.

Advantages:

Disadvantages:

This is definitely a bycicle shed, since the existing solution is not clearly worse, so I'm giving this lowest priority. Still writing down the idea because it does illustrate the potential usefulness of RequireJS plugins.