We are currently using RequireJS with CoffeeScript to generate custom JS files. However, we are not using the "r.js" compiler tool to optimize the code with the "define" header. Our current implementation requires that we put the full
statement at the top of each coffee file:
define('charts/bar', ['charts/base','constants'], (BaseModel, Constants) ->
class BarChart extends BaseModel
We are looking to move to TypeScript so we can make use of refactoring and all the other goodness that comes with it. The problem that we are running into is that we have not been able to figure out how to compile all of our TypeScript files into a single file.
For example, assume the following files:
With all of these files, we want to put them into a single file called
and reuse this js file across multiple pages. One page might only use the users/security
class, while the next page might use the data/geo
class along with some of the various chart
How can we construct this using requirejs?
One thing to keep in mind is that we don't have a single entry point to this class. It's purpose is solely to be used for helper classes and base implementations that we can extend in other classes.