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
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
How to properly reference Atom's node packages from user packages? #2548
To my understanding, first-mate doesn't export Grammar. But if you were trying to import something that first-mate exports, like GrammarRegistry, you could do the following:
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
lee-dohm commentedon Jun 7, 2014
To my understanding, first-mate doesn't export
Grammar. But if you were trying to import something that first-mate exports, likeGrammarRegistry, you could do the following:first-mateto thepackage.jsonof your package in the dependencies section, like seen here: https://github.com/atom/whitespace/blob/master/package.json#L11apm installin the package directory when developing. This installs your package'snpmdependencies{GrammarRegistry} = require 'first-mate'in your sourcep-e-w commentedon Jun 8, 2014
True, turns out that
Grammaris not exported. I hadn't even considered that possibility sinceGrammaris explicitly listed in the API docs :)I have filed a pull request to export the class as I believe it is a good idea to allow developers to create their own language grammars in JS.
lock commentedon Jan 26, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!