-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure the files are joined in alphabetical order for wildcard patterns #2673
Comments
Those expansions come from your shell actually, that's why they differ across platforms. There's nothing node/coffee can really do about them. |
Yeap, this is no Coffee's fault. To solve both of those problems, you can use coffee --join client.js --compile $(ls shared_*.coffee client_*.coffee) |
But what about on Windows? One benifit of CoffeeScript commands is that they can be the same on both Linux and Windows. Can't just add a simple "sort file names" function to the compiler to ensure that on all platforms they are compiled in the same order using the same command? Why do we have to rely on the OS to achieve this? I know it's just a small question. I can use many workarounds. I just hope the compiler to be "perfect" because CoffeeScript is already a perfect language to me. |
Ho, i'd be so proud in Jeremy's shoes. I hope you don't come across some of the parsing issues hehe. Anyway, the thing is that it's not as easy as just sorting the files alphabetically in the compiler. The order in which you pass the files to coffee --join script.js --compile utils.coffee app.coffee This is the current behavior, and i think it's pretty reasonable. If i want the files to be joined in a different order, i'd just change the order of the parameters and that's all. Besides, it's not that the coffee compiler is behaving differently in different platforms in this case. It's that you're calling the coffee compiler differently in different platforms. |
if you're on windows then install cygwin or something :D else you're gonna have a bad time (well not using it myself but I'm using some build tools so yeah) |
hi demian, |
@zhanzhenzhen: I think you're still not getting the fact that your shell expands that wildcard before we ever see it. |
I think compiler should add some functions to make sure the files are joined alphabetically for wildcard patterns. For example, if I use:
--join client.js --compile client__.coffee
on my Ubuntu they are actually alphabetically sorted, but it seems I can't rely on it for all platforms.
Another suggestion is: Consider this option:
--join client.js --compile shared__.coffee client__.coffee
If there are no shared__.coffee files, it will result in an error. But I think it should still continue to compile the client_*.coffee files.
The text was updated successfully, but these errors were encountered: