I’m taking over my co-worker’s coffee script project. He coded all the classes in one single coffee script file.
I like to separate all the classes into their own files. I found out that I can separate files then export the class to ‘window’ object. The problem with that method is that coffee script generates separate javascript files.
Is there a way to separate coffee script files then compile them into one single js file?
Yes. Coffescript compiler has a
--joincommand exactly for this case.You can do it like this: