Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@patrick-steele-idem
Copy link

I was able to get first-mate to work in the browser without making any code changes and by only modifying the project's package.json file.

  • Upgraded to event-kit@2.0.0
  • Added onigurumajs as a dependency
  • Using the browser override field in the package.json:
    • Use onigurumajs in the browser (instead of oniguruma which of course requires native C++ bindings)
    • Disabled fs-plus, season, grim and emissary for the browser (all have references to fs, a server only module)

Other than upgrading event-kit this 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-mate worked 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-modes

Please let me know if you have any questions or thoughts. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants