You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would keep all the file data in the first argument and options in the second as at the moment when doing raw input you have to put the file names as the first argument and the file content in the second, which isn't very obvious (see #30).
2. Restructure internals to be raw-input based
The inner code should not treat folder traversal as the default.
linguist([folders],{ opts1 })//Should just be an alias forconstfilesData=getAllFilesAndTheirContents(inputPath)linguist(filesData,{ opts1})
I.e., treat the raw input as the default input method and when folder paths are used as input the file contents are grabbed and then from that point on it is treated like raw input.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My current ideas for a future v3.0 of LinguistJS.
If you have some ideas for good changes to this program, comment them below.
1. More streamlined raw content inputting
Perhaps make the input signature the following:
This would keep all the file data in the first argument and options in the second as at the moment when doing raw input you have to put the file names as the first argument and the file content in the second, which isn't very obvious (see #30).
2. Restructure internals to be raw-input based
The inner code should not treat folder traversal as the default.
I.e., treat the raw input as the default input method and when folder paths are used as input the file contents are grabbed and then from that point on it is treated like raw input.
Beta Was this translation helpful? Give feedback.
All reactions