Skip to content
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

Compiled files are different in different machines with same code #63

Open
zhengyun1112 opened this issue Mar 13, 2013 · 5 comments
Open

Comments

@zhengyun1112
Copy link

I tried to compile same coffee scripts in two different machines (Mac and Ubuntu), but the classes order in compiled file is quite different. Is there a way to workaround it? Thanks.

@arboleya
Copy link
Owner

The code functionalities still works regardless this order differences?

@ghost ghost assigned arboleya Mar 13, 2013
@zhengyun1112
Copy link
Author

Seems works. But as the my code size keep growing, it makes me not so comfortable that the classes orders keep changing, I have to run through more tests even I just make a tiny change. Do you know if what would be the root cause? Different node.js/npm version? or the OS? Thanks.

@zhengyun1112
Copy link
Author

Is there a way to specify the file orders in toaster config file, like the "vendors" tag in config file?
And it seems that it's caused by the inconsistent result returned by fs.readdirSync. Is it possible to sort the results in toaster code when retrieves all the files?

@arboleya
Copy link
Owner

Yes, my best guess is that it's because of the fs.readdir behavior that may change from system to system, according it's implementation.

There's no option for ordering src files, this functionality makes sense in vendors because they are third part libs and you cannot use the import directive provided by coffee toaster inside existing js files.

It's possible to sort the files tree after the first collect to normalize this, I'll check how easy it is to implement on the refactoring I'm currently working on.

@arboleya
Copy link
Owner

@ZY1984 Hi, I just want to tell you that I'm discontinuing Toaster in favor of it's new fork named Polvo.

More info here:

https://github.com/serpentem/coffee-toaster
https://github.com/serpentem/coffee-toaster/wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants