Importing Grammar javascript file


#1

I am creating a package, and in that package I need to extend the Grammar class (https://github.com/atom/first-mate/blob/v7.0.7/src/grammar.coffee) What would I put in the require to successfully import that? Also, how would I import the modules like Oniguruma that atom has included


Syntax highlighting with javascript
#2

Perhaps have a look at:
A confusion of grammars: Need help integrating one grammar within another


#4

I just want to know how to import it (IE what to put in require). I can do const firstMate = require(path.dirname(path.dirname(require.resolve("atom"))) + "/node_modules/first-mate");, but that seems hacky