-
Notifications
You must be signed in to change notification settings - Fork 16
No subprocess #112
No subprocess #112
Conversation
subprocess. lintOnFly can be enabled as a result. No need for executable path config is there's no executable.
We are depending on an internal API. Incompatibilities could be introduced at any time.
lib/index.js
Outdated
| @@ -1,8 +1,13 @@ | |||
| 'use babel'; | |||
|
|
|||
| import * as fs from 'fs'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible these modules should be lazily loaded, I've used lazy-req in the past, but if you have a better method go for it 😉.
Right now this will increase the package loading time as these will be required on Atom launch.
(This comment goes for all the imports.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed out all the imports for require calls in the places where they are needed. It looks a little odd, but it shaved about 20-30ms off the load time.
|
Whoops. I responded to your comments but then they disappeared when I pushed the new commit. |
|
Should I change anything else? Is there someone who needs to look this over before it can be merged? |
|
Comments on a specific line of code are collapsed when the underlying code in a PR is updated to make the comment no longer relevant to that line of code. It's a nice feature of GitHub so when fixes/changes are made to the code the comments that are (most likely) no longer relevant are hidden unless somebody explicitly looks for them. |
lib/index.js
Outdated
| }; | ||
|
|
||
| let executablePath = ''; | ||
| export const config = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this line.
|
So the point I was trying to make with the Since Atom is usually pretty good about caching |
|
I'm ok with it |
|
When does require not cache loads? I thought it cached everything unless something explicitly deleted it's cache. |
|
So it's ready to merge? Nothing else to do? |
|
Sorry, this must have gotten lost in my notifications 😞. Taking one more look over this and then merging. |
|
Published as v1.2.0, thanks again! 🎉 |
Instead of running htmlhint as a subprocess, import and call it directly with the buffer contents. This enables
lintOnFly.Solves #111