Re: GJS Status



On Tue, Dec 8, 2015 at 1:17 AM Andrea Giammarchi <andrea giammarchi gmail com> wrote:
[...]
About the documentation, I don't actually parse it: I just read all file names (https://github.com/WebReflection/jsgtk/blob/master/python-to.js) and based on these I create the file that will optionally make the API camel case.

Nonetheless, I'd recommend parsing the GIR even over listing the file names. It's all the info you need in one file, it's already present on your system, and you wouldn't have to do such things like "catch (probablyAProperty)" because the GIR is always unambiguous.
 
As far as I have used _javascript_ (15+ years at this point) in both Web or Rhino/Nashorn/node/Server projects, methods and properties have always been camelCase.

I know, it's a bit of a wart that methods are not camelcase in GJS. I'm just saying that I don't know how likely that change would be to be committed into GJS. Of course you are free to write whatever API shims you want for your own projects ;-)

However, I'd like to generate Gtk and WebKit namespace too (or all others different from  GObject, GLib, and Gio in this link https://people.gnome.org/~gcampagna/docs/ which is mentioned in this page https://wiki.gnome.org/Projects/Gjs/Documentation) for both reading files and also to document myself locally instead of bothering some GNOME or Github server ;-)

Would this procedure via Ruby you've mentioned make it possible to have all those files generated as well? Right now as soon as I make it stops after static folder is parsed with anything in the generated list.

No, I don't generate a separate file for each method in this documentation. I didn't realize you only wanted the documentation in order to read its file names. In that case it's probably not useful to you... unless you want documentation ;-)

Regards,
Philip


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]