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

Replace sed with TS program #41

Closed
aleksei-berezkin opened this issue May 4, 2020 · 3 comments
Closed

Replace sed with TS program #41

aleksei-berezkin opened this issue May 4, 2020 · 3 comments

Comments

@aleksei-berezkin
Copy link
Contributor

First thanks and congrats with 1.0.0 release!

Working on my last PR I had problem with sed: -i option is not standard and it didn't work on my system. I checked what sed is doing — in all places it just replaces by regex. What if I write simple TS script doing the same? I believe it will simplify further contributions.

@emmanueltouzery
Copy link
Owner

Hi!

sed, you mean for the make_doc.sh script?

yes, it just overwrites the file changing the regex:

   -i[SUFFIX], --in-place[=SUFFIX]
          edit files in place (makes backup if SUFFIX supplied)

If it's that, then there is a clear plan of action, because that script actually calls a small node app: scripts/make_doc_extra/make_doc_extra.ts

so the idea would be to remove make_doc.sh and rename make_doc_extra into make_doc.ts which would handle all the code I guess -- what make_doc_extra is currently doing, plus what make_doc.sh is currently doing.

If you're interested, there is another thing, if we look further. What make_doc is doing is to modify the HTML generated by typedoc to obtain the rendering that we want, in particular group the classes by categories "control", "collection", "core". That way the documentation is clearer.

But the fact that we modify the generated HTML has caused me to be very conservative about upgrading the typedoc version. So if you're playing with that part of the code, maybe you can also try upgrading the typedoc dependency & see how that works out. But presumably one thing at a time of course, and only if you're interested!

@aleksei-berezkin
Copy link
Contributor Author

Okay, sounds interesting. By coincidence I like refactoring and cleaning up the code :) Not closing issue so far because it's possible I'll have some questions.

@aleksei-berezkin
Copy link
Contributor Author

Done #42

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

No branches or pull requests

2 participants