-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
Common Opal & MRI files should be segregated #456
Comments
Sincerely, I think it's fine as is, Having unrelated code in the parser is a bug in itself. |
The uglify stuff is in the builder, and that makes sense to me, anyway it clearly doesn't belong to opal-parser.js. |
It's used only in the rake task and now it's no longer added to opal-parser. related: #456
We all agree that the Util code needed to be moved. Still, I'm curious as to what is the perceived advantage of having MRI-only and MRI+Opal in the same directory? It's probably clear for you guys which is which (and even then, someone made the mistake of putting the That you follow my recommendation or not, the README should be modified, either to state that
|
That is true, it's code that runs in your Ruby environment (in this case Opal) and it compiles Ruby to Javascript :P Anyway |
Doesn't Anyways, I'll shut up now and let you guys decide. Sorry if I'm a bit of a newb 😃 |
Yes, most of it, the uglify/gzipping stuff shouldn't have been there in the first place IMHO. |
There are files in
lib/
that are meant both for Ruby MRI and Opal, in particularlib/parser
. There are other files that are meant only for Ruby (e.g. lib/sprockets). I'd strongly recommend splitting thelib
folder in two, saycommon
andlib
or similar.This would help avoiding other issues, like the fact that some methods are included in opal-parser when they shouldn't, e.g.
uglify
. When playing around for #455 I thought I was going crazy when the following:would make
rake dist
produce an emptyopal-parser
file... It didn't cross my mind that this would also be interpreted as literal (and invalid) JS!I'll make a pull request if you like, just confirm this all makes sense and I'm not missing something.
The text was updated successfully, but these errors were encountered: