This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Updated package.json to allow first-mate to work in the browser #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was able to get
first-mateto work in the browser without making any code changes and by only modifying the project'spackage.jsonfile.event-kit@2.0.0onigurumajsas a dependencybrowseroverride field in thepackage.json:onigurumawhich of course requires native C++ bindings)fs-plus,season,grimandemissaryfor the browser (all have references tofs, a server only module)Other than upgrading
event-kitthis does not impact any of the code running on the server. All tests are passing.After these changes I used my JavaScript module bundler to build the browser bundles and
first-mateworked perfectly for the language grammar files I tried (language-marko, language-javascript and language-css). I also created an adapter that allows any Atom grammar file to be used to apply syntax highlighting in a CodeMirror editor: https://github.com/patrick-steele-idem/codemirror-atom-modesPlease let me know if you have any questions or thoughts. Thanks!